Fork of 
        UniGraphic 
        by  GraphicsDisplay 
« Back to documentation index 
    
PAR8 Class Reference 
Parallel 8bit interface.  
More... 
#include <PAR8.h >
Inherits Protocols .
  PAR8  (PortName port, PinName CS, PinName reset, PinName DC, PinName WR, PinName RD)  Create a PAR8  display interface with a GPIO port and 5 control pins.   virtual void  wr_cmd8  (unsigned char cmd)  Send 8bit command to display controller.   virtual void  wr_data8  (unsigned char data)  Send 8bit data to display controller.   virtual void  wr_cmd16  (unsigned short cmd)  Send 2x8bit command to display controller.   virtual void  wr_data16  (unsigned short data)  Send 2x8bit data to display controller.   virtual void  wr_gram  (unsigned short data)  Send 16bit pixeldata to display controller.   virtual void  wr_gram  (unsigned short data, unsigned int count)  Send same 16bit pixeldata to display controller multiple times.   virtual void  wr_grambuf  (unsigned short *data, unsigned int lenght)  Send array of pixeldata shorts to display controller.   virtual unsigned short  rd_gram  (bool convert)  Read 16bit pixeldata from display controller (with dummy cycle)   virtual unsigned int  rd_reg_data32  (unsigned char reg)  Read 4x8bit register data (with dummy cycle)   virtual unsigned int  rd_extcreg_data32  (unsigned char reg, unsigned char SPIreadenablecmd)  Read 3x8bit ExtendedCommands register data.   virtual void  dummyread  ()  ILI932x  specific, does a dummy read cycle, number of bits is protocol dependent for PAR protocols: a signle RD bit toggle for SPI8 : 8clocks for SPI16 : 16 clocks.  virtual void  reg_select  (unsigned char reg, bool forread=false)  ILI932x  specific, select register for a successive write or read.  virtual void  reg_write  (unsigned char reg, unsigned short data)  ILI932x  specific, write register with data.  virtual unsigned short  reg_read  (unsigned char reg)  ILI932x  specific, read register.  virtual void  hw_reset  ()  HW reset sequence (without display init commands)   virtual void  BusEnable  (bool enable)  Set ChipSelect high or low.   
Detailed Description 
Parallel 8bit interface. 
Definition at line 12  of file PAR8.h .
Constructor & Destructor Documentation 
      
        
          PAR8  ( 
          PortName  
           port ,  
         
        
          PinName  
           CS ,  
         
        
          PinName  
           reset ,  
         
        
          PinName  
           DC ,  
         
        
          PinName  
           WR ,  
         
        
          PinName  
           RD   
         
        
          ) 
           
      
 
Create a PAR8  display interface with a GPIO port and 5 control pins. 
Parameters: 
  
    port GPIO port to use  CS pin connected to CS of display  reset pin connected to RESET of display  DC pin connected to data/command of display  WR pin connected to SDI of display  RD pin connected to RS of display  
   
Definition at line 23  of file PAR8.cpp .
 
 
Member Function Documentation 
      
        
          void BusEnable  
          ( 
          bool  
           enable  ) 
           [protected, virtual] 
      
 
Set ChipSelect high or low. 
Parameters: 
  
   
Implements Protocols .
Definition at line 274  of file PAR8.cpp .
 
 
      
        
          void dummyread  
          ( 
           ) 
           [protected, virtual] 
      
 
ILI932x  specific, does a dummy read cycle, number of bits is protocol dependent for PAR protocols: a signle RD bit toggle for SPI8 : 8clocks for SPI16 : 16 clocks. 
Implements Protocols .
Definition at line 199  of file PAR8.cpp .
 
 
      
        
          void hw_reset  
          ( 
           ) 
           [protected, virtual] 
      
 
HW reset sequence (without display init commands) 
Implements Protocols .
Definition at line 262  of file PAR8.cpp .
 
 
      
        
          unsigned int rd_extcreg_data32  
          ( 
          unsigned char  
           reg ,  
         
        
          unsigned char  
           SPIreadenablecmd   
         
        
          ) 
           [protected, virtual] 
      
 
Read 3x8bit ExtendedCommands register data. 
Parameters: 
  
   
Returns: data as uint  Note: EXTC regs (0xB0 to 0xFF) are read/write registers, for Parallel mode directly accessible in both directions  Implements Protocols .
Definition at line 194  of file PAR8.cpp .
 
 
      
        
          unsigned short rd_gram  
          ( 
          bool  
           convert  ) 
           [protected, virtual] 
      
 
Read 16bit pixeldata from display controller (with dummy cycle) 
Parameters: 
  
    convert true/false. Convert 18bit to 16bit, some controllers returns 18bit  
   
Returns: 16bit color  Implements Protocols .
Definition at line 121  of file PAR8.cpp .
 
 
      
        
          unsigned int rd_reg_data32  
          ( 
          unsigned char  
           reg  ) 
           [protected, virtual] 
      
 
Read 4x8bit register data (with dummy cycle) 
Parameters: 
  
   
Returns: data as uint  Implements Protocols .
Definition at line 155  of file PAR8.cpp .
 
 
      
        
          unsigned short reg_read  
          ( 
          unsigned char  
           reg  ) 
           [protected, virtual] 
      
 
ILI932x  specific, read register. 
Parameters: 
  
   
Returns: 16bit register value  Implements Protocols .
Definition at line 239  of file PAR8.cpp .
 
 
      
        
          void reg_select  
          ( 
          unsigned char  
           reg ,  
         
        
          bool  
           forread  = false  
         
        
          ) 
           [protected, virtual] 
      
 
ILI932x  specific, select register for a successive write or read. 
Parameters: 
  
    reg register to be selected  forread false = a write next (default), true = a read next  
   
Note: forread only used by SPI protocols  Implements Protocols .
Definition at line 209  of file PAR8.cpp .
 
 
      
        
          void reg_write  
          ( 
          unsigned char  
           reg ,  
         
        
          unsigned short  
           data   
         
        
          ) 
           [protected, virtual] 
      
 
ILI932x  specific, write register with data. 
Parameters: 
  
    reg register to write  data 16bit data  
   
Implements Protocols .
Definition at line 221  of file PAR8.cpp .
 
 
      
        
          void wr_cmd16  
          ( 
          unsigned short  
           cmd  ) 
           [protected, virtual] 
      
 
Send 2x8bit command to display controller. 
Parameters: 
  
   
Implements Protocols .
Definition at line 50  of file PAR8.cpp .
 
 
      
        
          void wr_cmd8  
          ( 
          unsigned char  
           cmd  ) 
           [protected, virtual] 
      
 
Send 8bit command to display controller. 
Parameters: 
  
   
Implements Protocols .
Definition at line 36  of file PAR8.cpp .
 
 
      
        
          void wr_data16  
          ( 
          unsigned short  
           data  ) 
           [protected, virtual] 
      
 
Send 2x8bit data to display controller. 
Parameters: 
  
   
Implements Protocols .
Definition at line 61  of file PAR8.cpp .
 
 
      
        
          void wr_data8  
          ( 
          unsigned char  
           data  ) 
           [protected, virtual] 
      
 
Send 8bit data to display controller. 
Parameters: 
  
   
Implements Protocols .
Definition at line 44  of file PAR8.cpp .
 
 
      
        
          void wr_gram  
          ( 
          unsigned short  
           data  ) 
           [protected, virtual] 
      
 
Send 16bit pixeldata to display controller. 
Parameters: 
  
   
Implements Protocols .
Definition at line 70  of file PAR8.cpp .
 
 
      
        
          void wr_gram  
          ( 
          unsigned short  
           data ,  
         
        
          unsigned int  
           count   
         
        
          ) 
           [protected, virtual] 
      
 
Send same 16bit pixeldata to display controller multiple times. 
Parameters: 
  
    data,: halfword to send  count,: how many  
   
Implements Protocols .
Definition at line 79  of file PAR8.cpp .
 
 
      
        
          void wr_grambuf  
          ( 
          unsigned short *  
           data ,  
         
        
          unsigned int  
           lenght   
         
        
          ) 
           [protected, virtual] 
      
 
Send array of pixeldata shorts to display controller. 
Parameters: 
  
    data,: unsigned short pixeldata array  lenght,: lenght (in shorts)  
   
Implements Protocols .
Definition at line 107  of file PAR8.cpp .