![]() |
LibDriver ST7920
|
st7920 basic driver modules More...
Data Structures | |
| struct | st7920_handle_s |
| st7920 handle structure definition More... | |
| struct | st7920_info_s |
| st7920 information structure definition More... | |
Macros | |
| #define | ST7920_COMMAND_CMD_DELAY 100 |
| st7920 command cmd delay definition | |
| #define | ST7920_COMMAND_DATA_DELAY 10 |
| st7920 command data delay definition | |
Typedefs | |
| typedef struct st7920_handle_s | st7920_handle_t |
| st7920 handle structure definition | |
| typedef struct st7920_info_s | st7920_info_t |
| st7920 information structure definition | |
Functions | |
| uint8_t | st7920_info (st7920_info_t *info) |
| get chip's information | |
| uint8_t | st7920_init (st7920_handle_t *handle) |
| initialize the chip | |
| uint8_t | st7920_deinit (st7920_handle_t *handle) |
| close the chip | |
| uint8_t | st7920_write_string (st7920_handle_t *handle, uint8_t x, uint8_t y, char *str) |
| show a string | |
| uint8_t | st7920_display_clear (st7920_handle_t *handle) |
| clear the display | |
| uint8_t | st7920_return_home (st7920_handle_t *handle) |
| return the home | |
| uint8_t | st7920_set_entry_mode (st7920_handle_t *handle, st7920_display_shift_t shift, st7920_address_counter_mode_t mode) |
| set the entry mode | |
| uint8_t | st7920_set_display_control (st7920_handle_t *handle, st7920_bool_t display_on, st7920_bool_t cursor_on, st7920_bool_t character_blink_on) |
| set the display control | |
| uint8_t | st7920_set_display_shift_mode (st7920_handle_t *handle, st7920_display_shift_mode_t mode) |
| set the display shift mode | |
| uint8_t | st7920_set_function (st7920_handle_t *handle, st7920_interface_bus_bit_t bus_bit, st7920_command_mode_t mode) |
| set the function | |
| uint8_t | st7920_set_cgram_address (st7920_handle_t *handle, uint8_t addr) |
| set the cgram address | |
| uint8_t | st7920_set_ddram_address (st7920_handle_t *handle, uint8_t addr) |
| set the ddram address | |
| uint8_t | st7920_write_ram (st7920_handle_t *handle, uint8_t *data, uint8_t len) |
| write the ram | |
st7920 basic driver modules
| #define ST7920_COMMAND_CMD_DELAY 100 |
| #define ST7920_COMMAND_DATA_DELAY 10 |
| typedef struct st7920_handle_s st7920_handle_t |
st7920 handle structure definition
| typedef struct st7920_info_s st7920_info_t |
st7920 information structure definition
st7920 address counter mode enumeration definition
| Enumerator | |
|---|---|
| ST7920_ADDRESS_COUNTER_MODE_DECREASE | decrease |
| ST7920_ADDRESS_COUNTER_MODE_INCREASE | increase |
Definition at line 85 of file driver_st7920.h.
| enum st7920_bool_t |
st7920 bool enumeration definition
| Enumerator | |
|---|---|
| ST7920_BOOL_FALSE | false |
| ST7920_BOOL_TRUE | true |
Definition at line 76 of file driver_st7920.h.
st7920 command mode enumeration definition
| Enumerator | |
|---|---|
| ST7920_COMMAND_MODE_BASIC | basic mode |
| ST7920_COMMAND_MODE_EXTENDED | extended mode |
Definition at line 123 of file driver_st7920.h.
st7920 display shift mode enumeration definition
Definition at line 103 of file driver_st7920.h.
st7920 display shift enumeration definition
| Enumerator | |
|---|---|
| ST7920_DISPLAY_SHIFT_RIGHT | cursor moves right |
| ST7920_DISPLAY_SHIFT_LEFT | cursor moves left |
Definition at line 94 of file driver_st7920.h.
st7920 interface bus bit enumeration definition
| Enumerator | |
|---|---|
| ST7920_INTERFACE_BUS_BIT_4 | 4 bit |
| ST7920_INTERFACE_BUS_BIT_8 | 8 bit |
Definition at line 114 of file driver_st7920.h.
| uint8_t st7920_deinit | ( | st7920_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an st7920 handle structure |
Definition at line 337 of file driver_st7920.c.
| uint8_t st7920_display_clear | ( | st7920_handle_t * | handle | ) |
clear the display
| [in] | *handle | pointer to an st7920 handle structure |
Definition at line 1107 of file driver_st7920.c.
| uint8_t st7920_info | ( | st7920_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an st7920 info structure |
Definition at line 1914 of file driver_st7920.c.
| uint8_t st7920_init | ( | st7920_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an st7920 handle structure |
Definition at line 214 of file driver_st7920.c.
| uint8_t st7920_return_home | ( | st7920_handle_t * | handle | ) |
return the home
| [in] | *handle | pointer to an st7920 handle structure |
Definition at line 1228 of file driver_st7920.c.
| uint8_t st7920_set_cgram_address | ( | st7920_handle_t * | handle, |
| uint8_t | addr ) |
set the cgram address
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | addr | cgram address |
Definition at line 1434 of file driver_st7920.c.
| uint8_t st7920_set_ddram_address | ( | st7920_handle_t * | handle, |
| uint8_t | addr ) |
set the ddram address
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | addr | ddram address |
Definition at line 1482 of file driver_st7920.c.
| uint8_t st7920_set_display_control | ( | st7920_handle_t * | handle, |
| st7920_bool_t | display_on, | ||
| st7920_bool_t | cursor_on, | ||
| st7920_bool_t | character_blink_on ) |
set the display control
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | display_on | bool value |
| [in] | cursor_on | bool value |
| [in] | character_blink_on | bool value |
Definition at line 1313 of file driver_st7920.c.
| uint8_t st7920_set_display_shift_mode | ( | st7920_handle_t * | handle, |
| st7920_display_shift_mode_t | mode ) |
set the display shift mode
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | mode | display shift mode |
Definition at line 1355 of file driver_st7920.c.
| uint8_t st7920_set_entry_mode | ( | st7920_handle_t * | handle, |
| st7920_display_shift_t | shift, | ||
| st7920_address_counter_mode_t | mode ) |
set the entry mode
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | shift | display shift |
| [in] | mode | address counter mode |
Definition at line 1269 of file driver_st7920.c.
| uint8_t st7920_set_function | ( | st7920_handle_t * | handle, |
| st7920_interface_bus_bit_t | bus_bit, | ||
| st7920_command_mode_t | mode ) |
set the function
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | bus_bit | bus bit |
| [in] | mode | command mode |
Definition at line 1397 of file driver_st7920.c.
| uint8_t st7920_write_ram | ( | st7920_handle_t * | handle, |
| uint8_t * | data, | ||
| uint8_t | len ) |
write the ram
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 1530 of file driver_st7920.c.
| uint8_t st7920_write_string | ( | st7920_handle_t * | handle, |
| uint8_t | x, | ||
| uint8_t | y, | ||
| char * | str ) |
show a string
| [in] | *handle | pointer to an st7920 handle structure |
| [in] | x | coordinate x |
| [in] | y | coordinate y |
| [in] | *str | pointer to a write string address |
Definition at line 548 of file driver_st7920.c.