123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- #ifndef ZEPHYR_INCLUDE_DISPLAY_GROVE_LCD_H_
- #define ZEPHYR_INCLUDE_DISPLAY_GROVE_LCD_H_
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define GROVE_LCD_NAME "GLCD"
- void glcd_print(const struct device *port, char *data, uint32_t size);
- void glcd_cursor_pos_set(const struct device *port, uint8_t col, uint8_t row);
- void glcd_clear(const struct device *port);
- #define GLCD_DS_DISPLAY_ON (1 << 2)
- #define GLCD_DS_DISPLAY_OFF (0 << 2)
- #define GLCD_DS_CURSOR_ON (1 << 1)
- #define GLCD_DS_CURSOR_OFF (0 << 1)
- #define GLCD_DS_BLINK_ON (1 << 0)
- #define GLCD_DS_BLINK_OFF (0 << 0)
- void glcd_display_state_set(const struct device *port, uint8_t opt);
- uint8_t glcd_display_state_get(const struct device *port);
- #define GLCD_IS_SHIFT_INCREMENT (1 << 1)
- #define GLCD_IS_SHIFT_DECREMENT (0 << 1)
- #define GLCD_IS_ENTRY_LEFT (1 << 0)
- #define GLCD_IS_ENTRY_RIGHT (0 << 0)
- void glcd_input_state_set(const struct device *port, uint8_t opt);
- uint8_t glcd_input_state_get(const struct device *port);
- #define GLCD_FS_8BIT_MODE (1 << 4)
- #define GLCD_FS_ROWS_2 (1 << 3)
- #define GLCD_FS_ROWS_1 (0 << 3)
- #define GLCD_FS_DOT_SIZE_BIG (1 << 2)
- #define GLCD_FS_DOT_SIZE_LITTLE (0 << 2)
- void glcd_function_set(const struct device *port, uint8_t opt);
- uint8_t glcd_function_get(const struct device *port);
- #define GROVE_RGB_WHITE 0
- #define GROVE_RGB_RED 1
- #define GROVE_RGB_GREEN 2
- #define GROVE_RGB_BLUE 3
- void glcd_color_select(const struct device *port, uint8_t color);
- void glcd_color_set(const struct device *port, uint8_t r, uint8_t g,
- uint8_t b);
- int glcd_initialize(const struct device *port);
- #ifdef __cplusplus
- }
- #endif
- #endif
|