changes...
This commit is contained in:
@@ -17,7 +17,7 @@ typedef enum {
|
||||
|
||||
}lcd_hd44780_bitmode;
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
|
||||
LCD_HD44780_CLEAR_DISP = 0x1,
|
||||
LCD_HD44780_RETURN_HOME = 0x2,
|
||||
@@ -25,34 +25,47 @@ enum {
|
||||
LCD_HD44780_DISP_ONOFF_CTL = 0x4,
|
||||
LCD_HD44780_CURSOR_SHIFT = 0x6,
|
||||
|
||||
};
|
||||
}hd44780_cmd_t;
|
||||
|
||||
enum{
|
||||
typedef enum{
|
||||
LCD_HD44780_GET = 0,
|
||||
LCD_HD44780_SET = 1,
|
||||
|
||||
};
|
||||
}hd44780_setGet_t;
|
||||
|
||||
typedef int (*setGet_DataGpio_Event_fpt)(void*, uint8_t data_input, uint8_t set_get )reentrant;
|
||||
typedef int (*setGet_ConfigGpio_Event_fpt)(void*, uint8_t data_input, uint8_t set_get )reentrant;
|
||||
typedef enum{
|
||||
LCD_HD44780_INSTRUCTION = 0,
|
||||
LCD_HD44780_DATA = 1,
|
||||
|
||||
}hd44780_InstData_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
uint8_t data_bus : 8;
|
||||
hd44780_setGet_t rw_pin : 1;
|
||||
uint8_t e_pin : 1;
|
||||
hd44780_InstData_t rs_pin :1 ;
|
||||
|
||||
}hd44780_gpioset_t;
|
||||
|
||||
typedef int (*setGet_Gpio_Event_fpt)(hd44780_gpioset_t *data_input, uint8_t set_get)reentrant;
|
||||
typedef int (*wait_ms_Event_fpt)(uint32_t delay_ms)reentrant;
|
||||
|
||||
typedef struct{
|
||||
|
||||
void *DataGpio;
|
||||
void *SettingsGpio;
|
||||
setGet_DataGpio_Event_fpt setGetDataIO_event;
|
||||
setGet_ConfigGpio_Event_fpt setGetConfigIO_event;
|
||||
setGet_Gpio_Event_fpt setGetGpio_event;
|
||||
wait_ms_Event_fpt wait_event;
|
||||
lcd_hd44780_bitmode bit_mode;
|
||||
uint8_t port_data;
|
||||
uint8_t port_settings;
|
||||
hd44780_gpioset_t gpio_data;
|
||||
|
||||
|
||||
}lcd_hd44780_t;
|
||||
|
||||
|
||||
void lcd_hd44780_init(lcd_hd44780_t *inst,lcd_hd44780_bitmode bit_mode);
|
||||
void lcd_hd44780_regConfigEvt(lcd_hd44780_t *inst , void *inst_Config, setGet_ConfigGpio_Event_fpt getConfigEvt_fpt);
|
||||
void lcd_hd44780_regDataEvt(lcd_hd44780_t *inst , void *inst_Data, setGet_DataGpio_Event_fpt getDataEvt_fpt);
|
||||
void lcd_hd44780_regGpioEvt(lcd_hd44780_t *inst, setGet_Gpio_Event_fpt getGpioEvt_fpt);
|
||||
void lcd_hd44780_regWaitEvt(lcd_hd44780_t *inst, wait_ms_Event_fpt waitEvt_fpt);
|
||||
|
||||
#endif /*LCD_HD44780_H_*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user