![]() |
LibDriver TM1637
|
tm1637 basic driver modules More...
Data Structures | |
| struct | tm1637_handle_s |
| tm1637 handle structure definition More... | |
| struct | tm1637_info_s |
| tm1637 information structure definition More... | |
Typedefs | |
| typedef struct tm1637_handle_s | tm1637_handle_t |
| tm1637 handle structure definition | |
| typedef struct tm1637_info_s | tm1637_info_t |
| tm1637 information structure definition | |
Enumerations | |
| enum | tm1637_address_mode_t { TM1637_ADDRESS_MODE_INC = 0x00 , TM1637_ADDRESS_MODE_FIX = 0x01 } |
| tm1637 address mode enumeration definition More... | |
| enum | tm1637_bool_t { TM1637_BOOL_FALSE = 0x00 , TM1637_BOOL_TRUE = 0x01 } |
| tm1637 bool enumeration definition More... | |
| enum | tm1637_pulse_width_t { TM1637_PULSE_WIDTH_1_DIV_16 = 0x00 , TM1637_PULSE_WIDTH_2_DIV_16 = 0x01 , TM1637_PULSE_WIDTH_4_DIV_16 = 0x02 , TM1637_PULSE_WIDTH_10_DIV_16 = 0x03 , TM1637_PULSE_WIDTH_11_DIV_16 = 0x04 , TM1637_PULSE_WIDTH_12_DIV_16 = 0x05 , TM1637_PULSE_WIDTH_13_DIV_16 = 0x06 , TM1637_PULSE_WIDTH_14_DIV_16 = 0x07 } |
| tm1637 pulse width enumeration definition More... | |
| enum | tm1637_number_t { TM1637_NUMBER_0 = 0x3F , TM1637_NUMBER_1 = 0x06 , TM1637_NUMBER_2 = 0x5B , TM1637_NUMBER_3 = 0x4F , TM1637_NUMBER_4 = 0x66 , TM1637_NUMBER_5 = 0x6D , TM1637_NUMBER_6 = 0x7D , TM1637_NUMBER_7 = 0x07 , TM1637_NUMBER_8 = 0x7F , TM1637_NUMBER_9 = 0x6F } |
| tm1637 number enumeration definition More... | |
Functions | |
| uint8_t | tm1637_info (tm1637_info_t *info) |
| get chip's information | |
| uint8_t | tm1637_init (tm1637_handle_t *handle) |
| initialize the chip | |
| uint8_t | tm1637_deinit (tm1637_handle_t *handle) |
| close the chip | |
| uint8_t | tm1637_clear_segment (tm1637_handle_t *handle) |
| clear segment | |
| uint8_t | tm1637_write_segment (tm1637_handle_t *handle, uint8_t addr, uint8_t *data, uint8_t len) |
| write segment | |
| uint8_t | tm1637_read_segment (tm1637_handle_t *handle, uint8_t *seg, uint8_t *k) |
| read segment | |
| uint8_t | tm1637_set_pulse_width (tm1637_handle_t *handle, tm1637_pulse_width_t width) |
| set pulse width | |
| uint8_t | tm1637_get_pulse_width (tm1637_handle_t *handle, tm1637_pulse_width_t *width) |
| get pulse width | |
| uint8_t | tm1637_set_display (tm1637_handle_t *handle, tm1637_bool_t enable) |
| enable or disable display | |
| uint8_t | tm1637_get_display (tm1637_handle_t *handle, tm1637_bool_t *enable) |
| get display status | |
| uint8_t | tm1637_set_address_mode (tm1637_handle_t *handle, tm1637_address_mode_t mode) |
| set address mode | |
| uint8_t | tm1637_get_address_mode (tm1637_handle_t *handle, tm1637_address_mode_t *mode) |
| get address mode | |
| uint8_t | tm1637_set_test_mode (tm1637_handle_t *handle, tm1637_bool_t enable) |
| enable or disable test mode | |
| uint8_t | tm1637_get_test_mode (tm1637_handle_t *handle, tm1637_bool_t *enable) |
| get test mode status | |
tm1637 basic driver modules
| typedef struct tm1637_handle_s tm1637_handle_t |
tm1637 handle structure definition
| typedef struct tm1637_info_s tm1637_info_t |
tm1637 information structure definition
tm1637 address mode enumeration definition
| Enumerator | |
|---|---|
| TM1637_ADDRESS_MODE_INC | auto increment 1 mode |
| TM1637_ADDRESS_MODE_FIX | fixed address mode |
Definition at line 62 of file driver_tm1637.h.
| enum tm1637_bool_t |
tm1637 bool enumeration definition
| Enumerator | |
|---|---|
| TM1637_BOOL_FALSE | false |
| TM1637_BOOL_TRUE | true |
Definition at line 71 of file driver_tm1637.h.
| enum tm1637_number_t |
tm1637 number enumeration definition
| Enumerator | |
|---|---|
| TM1637_NUMBER_0 | 0 |
| TM1637_NUMBER_1 | 1 |
| TM1637_NUMBER_2 | 2 |
| TM1637_NUMBER_3 | 3 |
| TM1637_NUMBER_4 | 4 |
| TM1637_NUMBER_5 | 5 |
| TM1637_NUMBER_6 | 6 |
| TM1637_NUMBER_7 | 7 |
| TM1637_NUMBER_8 | 8 |
| TM1637_NUMBER_9 | 9 |
Definition at line 95 of file driver_tm1637.h.
| enum tm1637_pulse_width_t |
tm1637 pulse width enumeration definition
Definition at line 80 of file driver_tm1637.h.
| uint8_t tm1637_clear_segment | ( | tm1637_handle_t * | handle | ) |
clear segment
| [in] | *handle | pointer to a tm1637 handle structure |
Definition at line 574 of file driver_tm1637.c.
| uint8_t tm1637_deinit | ( | tm1637_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a tm1637 handle structure |
Definition at line 209 of file driver_tm1637.c.
| uint8_t tm1637_get_address_mode | ( | tm1637_handle_t * | handle, |
| tm1637_address_mode_t * | mode ) |
get address mode
| [in] | *handle | pointer to a tm1637 handle structure |
| [out] | *mode | pointer to an address mode buffer |
Definition at line 417 of file driver_tm1637.c.
| uint8_t tm1637_get_display | ( | tm1637_handle_t * | handle, |
| tm1637_bool_t * | enable ) |
get display status
| [in] | *handle | pointer to a tm1637 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 354 of file driver_tm1637.c.
| uint8_t tm1637_get_pulse_width | ( | tm1637_handle_t * | handle, |
| tm1637_pulse_width_t * | width ) |
get pulse width
| [in] | *handle | pointer to a tm1637 handle structure |
| [out] | *width | pointer to a pulse width buffer |
Definition at line 291 of file driver_tm1637.c.
| uint8_t tm1637_get_test_mode | ( | tm1637_handle_t * | handle, |
| tm1637_bool_t * | enable ) |
get test mode status
| [in] | *handle | pointer to a tm1637 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 480 of file driver_tm1637.c.
| uint8_t tm1637_info | ( | tm1637_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a tm1637 info structure |
Definition at line 738 of file driver_tm1637.c.
| uint8_t tm1637_init | ( | tm1637_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a tm1637 handle structure |
Definition at line 144 of file driver_tm1637.c.
| uint8_t tm1637_read_segment | ( | tm1637_handle_t * | handle, |
| uint8_t * | seg, | ||
| uint8_t * | k ) |
read segment
| [in] | *handle | pointer to a tm1637 handle structure |
| [out] | *seg | pointer to a seg buffer |
| [out] | *k | pointer to a k buffer |
Definition at line 635 of file driver_tm1637.c.
| uint8_t tm1637_set_address_mode | ( | tm1637_handle_t * | handle, |
| tm1637_address_mode_t | mode ) |
set address mode
| [in] | *handle | pointer to a tm1637 handle structure |
| [in] | mode | address mode |
Definition at line 381 of file driver_tm1637.c.
| uint8_t tm1637_set_display | ( | tm1637_handle_t * | handle, |
| tm1637_bool_t | enable ) |
enable or disable display
| [in] | *handle | pointer to a tm1637 handle structure |
| [in] | enable | bool value |
Definition at line 318 of file driver_tm1637.c.
| uint8_t tm1637_set_pulse_width | ( | tm1637_handle_t * | handle, |
| tm1637_pulse_width_t | width ) |
set pulse width
| [in] | *handle | pointer to a tm1637 handle structure |
| [in] | width | pulse width |
Definition at line 255 of file driver_tm1637.c.
| uint8_t tm1637_set_test_mode | ( | tm1637_handle_t * | handle, |
| tm1637_bool_t | enable ) |
enable or disable test mode
| [in] | *handle | pointer to a tm1637 handle structure |
| [in] | enable | bool value |
Definition at line 444 of file driver_tm1637.c.
| uint8_t tm1637_write_segment | ( | tm1637_handle_t * | handle, |
| uint8_t | addr, | ||
| uint8_t * | data, | ||
| uint8_t | len ) |
write segment
| [in] | *handle | pointer to a tm1637 handle structure |
| [in] | addr | start address |
| [in] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 510 of file driver_tm1637.c.