collected functions.. 8 bit version funcs can also be reused in 4 bit mode..
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
#define LCD_HD44780_READ 1
|
||||
|
||||
typedef enum {
|
||||
LCD_BITMODE_8BIT,
|
||||
LCD_BITMODE_4BIT,
|
||||
LCD_HD44780_BITMODE_8BIT,
|
||||
LCD_HD44780_BITMODE_4BIT,
|
||||
|
||||
}lcd_hd44780_bitmode;
|
||||
|
||||
@@ -40,9 +40,25 @@ typedef enum{
|
||||
|
||||
}hd44780_InstData_t;
|
||||
|
||||
typedef struct{
|
||||
|
||||
uint8_t DB0 : 1;
|
||||
uint8_t DB1 : 1;
|
||||
uint8_t DB2 : 1;
|
||||
uint8_t DB3 : 1;
|
||||
uint8_t DB4 : 1;
|
||||
uint8_t DB5 : 1;
|
||||
uint8_t DB6 : 1;
|
||||
uint8_t DB7 : 1;
|
||||
|
||||
}hd44780_data_bits_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint8_t data_bus : 8;
|
||||
union{
|
||||
uint8_t data_bus : 8;
|
||||
hd44780_data_bits_t data_bits;
|
||||
};
|
||||
hd44780_setGet_t rw_pin : 1;
|
||||
uint8_t e_pin : 1;
|
||||
hd44780_InstData_t rs_pin :1 ;
|
||||
|
||||
Reference in New Issue
Block a user