![]() |
LibDriver TM1622
|
tm1622 basic driver modules More...
Data Structures | |
| struct | tm1622_handle_s |
| tm1622 handle structure definition More... | |
| struct | tm1622_info_s |
| tm1622 information structure definition More... | |
Macros | |
| #define | TM1622_COMMAND_DATA_DELAY 3 |
| tm1622 command data delay definition | |
Typedefs | |
| typedef struct tm1622_handle_s | tm1622_handle_t |
| tm1622 handle structure definition | |
| typedef struct tm1622_info_s | tm1622_info_t |
| tm1622 information structure definition | |
Enumerations | |
| enum | tm1622_bool_t { TM1622_BOOL_FALSE = 0x00 , TM1622_BOOL_TRUE = 0x01 } |
| tm1622 bool enumeration definition More... | |
| enum | tm1622_mode_t { TM1622_MODE_NORMAL = 0x00 , TM1622_MODE_TEST = 0x01 } |
| tm1622 mode enumeration definition More... | |
| enum | tm1622_clock_t { TM1622_CLOCK_RC_32K = 0x01 , TM1622_CLOCK_EXT_32K = 0x02 } |
| tm1622 clock enumeration definition More... | |
| enum | tm1622_tone_freq_t { TM1622_TONE_FREQ_2K = 0x00 , TM1622_TONE_FREQ_4K = 0x01 } |
| tm1622 tone freq enumeration definition More... | |
| enum | tm1622_freq_t { TM1622_FREQ_F1 = 0x00 , TM1622_FREQ_F2 = 0x01 , TM1622_FREQ_F4 = 0x02 , TM1622_FREQ_F8 = 0x03 , TM1622_FREQ_F16 = 0x04 , TM1622_FREQ_F32 = 0x05 , TM1622_FREQ_F64 = 0x06 , TM1622_FREQ_F128 = 0x07 } |
| tm1622 freq enumeration definition More... | |
Functions | |
| uint8_t | tm1622_info (tm1622_info_t *info) |
| get chip's information | |
| uint8_t | tm1622_init (tm1622_handle_t *handle) |
| initialize the chip | |
| uint8_t | tm1622_deinit (tm1622_handle_t *handle) |
| close the chip | |
| uint8_t | tm1622_write_segment (tm1622_handle_t *handle, uint8_t addr, uint8_t *data, uint8_t len) |
| write segment | |
| uint8_t | tm1622_clear_segment (tm1622_handle_t *handle) |
| clear segment | |
| uint8_t | tm1622_set_oscillator (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable oscillator | |
| uint8_t | tm1622_set_lcd_bias (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable lcd bias | |
| uint8_t | tm1622_set_mode (tm1622_handle_t *handle, tm1622_mode_t mode) |
| set mode | |
| uint8_t | tm1622_set_clock (tm1622_handle_t *handle, tm1622_clock_t clk) |
| set clock | |
| uint8_t | tm1622_set_freq (tm1622_handle_t *handle, tm1622_freq_t freq) |
| set freq | |
| uint8_t | tm1622_set_tone_freq (tm1622_handle_t *handle, tm1622_tone_freq_t freq) |
| set tone freq | |
| uint8_t | tm1622_set_timer (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable timer | |
| uint8_t | tm1622_set_watchdog (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable watchdog | |
| uint8_t | tm1622_set_tone (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable tone | |
| uint8_t | tm1622_set_irq (tm1622_handle_t *handle, tm1622_bool_t enable) |
| enable or disable irq | |
| uint8_t | tm1622_clear_timer (tm1622_handle_t *handle) |
| clear timer | |
| uint8_t | tm1622_clear_watchdog (tm1622_handle_t *handle) |
| clear watchdog | |
tm1622 basic driver modules
| #define TM1622_COMMAND_DATA_DELAY 3 |
| typedef struct tm1622_handle_s tm1622_handle_t |
tm1622 handle structure definition
| typedef struct tm1622_info_s tm1622_info_t |
tm1622 information structure definition
| enum tm1622_bool_t |
tm1622 bool enumeration definition
| Enumerator | |
|---|---|
| TM1622_BOOL_FALSE | false |
| TM1622_BOOL_TRUE | true |
Definition at line 69 of file driver_tm1622.h.
| enum tm1622_clock_t |
tm1622 clock enumeration definition
| Enumerator | |
|---|---|
| TM1622_CLOCK_RC_32K | rc 32k |
| TM1622_CLOCK_EXT_32K | ext 32k |
Definition at line 87 of file driver_tm1622.h.
| enum tm1622_freq_t |
tm1622 freq enumeration definition
Definition at line 105 of file driver_tm1622.h.
| enum tm1622_mode_t |
tm1622 mode enumeration definition
| Enumerator | |
|---|---|
| TM1622_MODE_NORMAL | normal mode |
| TM1622_MODE_TEST | test mode |
Definition at line 78 of file driver_tm1622.h.
| enum tm1622_tone_freq_t |
tm1622 tone freq enumeration definition
| Enumerator | |
|---|---|
| TM1622_TONE_FREQ_2K | tone 2k |
| TM1622_TONE_FREQ_4K | tone 4k |
Definition at line 96 of file driver_tm1622.h.
| uint8_t tm1622_clear_segment | ( | tm1622_handle_t * | handle | ) |
clear segment
| [in] | *handle | pointer to a tm1622 handle structure |
Definition at line 1338 of file driver_tm1622.c.
| uint8_t tm1622_clear_timer | ( | tm1622_handle_t * | handle | ) |
clear timer
| [in] | *handle | pointer to a tm1622 handle structure |
Definition at line 729 of file driver_tm1622.c.
| uint8_t tm1622_clear_watchdog | ( | tm1622_handle_t * | handle | ) |
clear watchdog
| [in] | *handle | pointer to a tm1622 handle structure |
Definition at line 761 of file driver_tm1622.c.
| uint8_t tm1622_deinit | ( | tm1622_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a tm1622 handle structure |
Definition at line 1234 of file driver_tm1622.c.
| uint8_t tm1622_info | ( | tm1622_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a tm1622 info structure |
Definition at line 1508 of file driver_tm1622.c.
| uint8_t tm1622_init | ( | tm1622_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a tm1622 handle structure |
Definition at line 1037 of file driver_tm1622.c.
| uint8_t tm1622_set_clock | ( | tm1622_handle_t * | handle, |
| tm1622_clock_t | clk ) |
set clock
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | clk | chip clock |
Definition at line 840 of file driver_tm1622.c.
| uint8_t tm1622_set_freq | ( | tm1622_handle_t * | handle, |
| tm1622_freq_t | freq ) |
set freq
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | freq | output freq |
Definition at line 886 of file driver_tm1622.c.
| uint8_t tm1622_set_irq | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable irq
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 684 of file driver_tm1622.c.
| uint8_t tm1622_set_lcd_bias | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable lcd bias
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 500 of file driver_tm1622.c.
| uint8_t tm1622_set_mode | ( | tm1622_handle_t * | handle, |
| tm1622_mode_t | mode ) |
set mode
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | mode | input mode |
Definition at line 794 of file driver_tm1622.c.
| uint8_t tm1622_set_oscillator | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable oscillator
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 454 of file driver_tm1622.c.
| uint8_t tm1622_set_timer | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable timer
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 546 of file driver_tm1622.c.
| uint8_t tm1622_set_tone | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable tone
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 638 of file driver_tm1622.c.
| uint8_t tm1622_set_tone_freq | ( | tm1622_handle_t * | handle, |
| tm1622_tone_freq_t | freq ) |
set tone freq
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | freq | tone freq |
Definition at line 992 of file driver_tm1622.c.
| uint8_t tm1622_set_watchdog | ( | tm1622_handle_t * | handle, |
| tm1622_bool_t | enable ) |
enable or disable watchdog
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | enable | bool value |
Definition at line 592 of file driver_tm1622.c.
| uint8_t tm1622_write_segment | ( | tm1622_handle_t * | handle, |
| uint8_t | addr, | ||
| uint8_t * | data, | ||
| uint8_t | len ) |
write segment
| [in] | *handle | pointer to a tm1622 handle structure |
| [in] | addr | address |
| [in] | *data | pointer to an input data buffer |
| [in] | len | input data length |
Definition at line 1300 of file driver_tm1622.c.