![]() |
LibDriver BUTTON
|
button basic driver modules More...
Data Structures | |
| struct | button_s |
| button structure definition More... | |
| struct | button_time_s |
| button time structure definition More... | |
| struct | button_decode_s |
| button decode structure definition More... | |
| struct | button_handle_s |
| button handle structure definition More... | |
| struct | button_info_s |
| button information structure definition More... | |
Macros | |
| #define | BUTTON_LENGTH 16 |
| button length definition | |
Typedefs | |
| typedef struct button_s | button_t |
| button structure definition | |
| typedef struct button_time_s | button_time_t |
| button time structure definition | |
| typedef struct button_decode_s | button_decode_t |
| button decode structure definition | |
| typedef struct button_handle_s | button_handle_t |
| button handle structure definition | |
| typedef struct button_info_s | button_info_t |
| button information structure definition | |
Enumerations | |
| enum | button_status_t { BUTTON_STATUS_PRESS = (1 << 0) , BUTTON_STATUS_RELEASE = (1 << 1) , BUTTON_STATUS_SINGLE_CLICK = (1 << 2) , BUTTON_STATUS_DOUBLE_CLICK = (1 << 3) , BUTTON_STATUS_TRIPLE_CLICK = (1 << 4) , BUTTON_STATUS_REPEAT_CLICK = (1 << 5) , BUTTON_STATUS_SHORT_PRESS_START = (1 << 6) , BUTTON_STATUS_SHORT_PRESS_END = (1 << 7) , BUTTON_STATUS_LONG_PRESS_START = (1 << 8) , BUTTON_STATUS_LONG_PRESS_HOLD = (1 << 9) , BUTTON_STATUS_LONG_PRESS_END = (1 << 10) } |
| check range More... | |
Functions | |
| uint8_t | button_info (button_info_t *info) |
| get chip's information | |
| uint8_t | button_irq_handler (button_handle_t *handle, uint8_t press_release) |
| irq handler | |
| uint8_t | button_period_handler (button_handle_t *handle) |
| period handler | |
| uint8_t | button_init (button_handle_t *handle) |
| initialize the chip | |
| uint8_t | button_deinit (button_handle_t *handle) |
| close the chip | |
| uint8_t | button_set_timeout (button_handle_t *handle, uint32_t us) |
| set timeout | |
| uint8_t | button_get_timeout (button_handle_t *handle, uint32_t *us) |
| get timeout | |
| uint8_t | button_set_interval (button_handle_t *handle, uint32_t us) |
| set interval | |
| uint8_t | button_get_interval (button_handle_t *handle, uint32_t *us) |
| get interval | |
| uint8_t | button_set_short_time (button_handle_t *handle, uint32_t us) |
| set short time | |
| uint8_t | button_get_short_time (button_handle_t *handle, uint32_t *us) |
| get short time | |
| uint8_t | button_set_long_time (button_handle_t *handle, uint32_t us) |
| set long time | |
| uint8_t | button_get_long_time (button_handle_t *handle, uint32_t *us) |
| get long time | |
| uint8_t | button_set_repeat_time (button_handle_t *handle, uint32_t us) |
| set repeat time | |
| uint8_t | button_get_repeat_time (button_handle_t *handle, uint32_t *us) |
| get repeat time | |
button basic driver modules
| #define BUTTON_LENGTH 16 |
| typedef struct button_decode_s button_decode_t |
button decode structure definition
| typedef struct button_handle_s button_handle_t |
button handle structure definition
| typedef struct button_info_s button_info_t |
button information structure definition
| typedef struct button_time_s button_time_t |
button time structure definition
| enum button_status_t |
check range
button status enumeration definition
Definition at line 76 of file driver_button.h.
| uint8_t button_deinit | ( | button_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a button handle structure |
Definition at line 544 of file driver_button.c.
| uint8_t button_get_interval | ( | button_handle_t * | handle, |
| uint32_t * | us ) |
get interval
| [in] | *handle | pointer to a button handle structure |
| [out] | *us | pointer to a time buffer |
Definition at line 648 of file driver_button.c.
| uint8_t button_get_long_time | ( | button_handle_t * | handle, |
| uint32_t * | us ) |
get long time
| [in] | *handle | pointer to a button handle structure |
| [out] | *us | pointer to a time buffer |
Definition at line 752 of file driver_button.c.
| uint8_t button_get_repeat_time | ( | button_handle_t * | handle, |
| uint32_t * | us ) |
get repeat time
| [in] | *handle | pointer to a button handle structure |
| [out] | *us | pointer to a time buffer |
Definition at line 804 of file driver_button.c.
| uint8_t button_get_short_time | ( | button_handle_t * | handle, |
| uint32_t * | us ) |
get short time
| [in] | *handle | pointer to a button handle structure |
| [out] | *us | pointer to a time buffer |
Definition at line 700 of file driver_button.c.
| uint8_t button_get_timeout | ( | button_handle_t * | handle, |
| uint32_t * | us ) |
get timeout
| [in] | *handle | pointer to a button handle structure |
| [out] | *us | pointer to a time buffer |
Definition at line 596 of file driver_button.c.
| uint8_t button_info | ( | button_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a button info structure |
Definition at line 828 of file driver_button.c.
| uint8_t button_init | ( | button_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a button handle structure |
Definition at line 487 of file driver_button.c.
| uint8_t button_irq_handler | ( | button_handle_t * | handle, |
| uint8_t | press_release ) |
irq handler
| [in] | *handle | pointer to a button handle structure |
| [in] | press_release | press or release |
Definition at line 360 of file driver_button.c.
| uint8_t button_period_handler | ( | button_handle_t * | handle | ) |
period handler
| [in] | *handle | pointer to a button handle structure |
Definition at line 108 of file driver_button.c.
| uint8_t button_set_interval | ( | button_handle_t * | handle, |
| uint32_t | us ) |
set interval
| [in] | *handle | pointer to a button handle structure |
| [in] | us | set time |
Definition at line 622 of file driver_button.c.
| uint8_t button_set_long_time | ( | button_handle_t * | handle, |
| uint32_t | us ) |
set long time
| [in] | *handle | pointer to a button handle structure |
| [in] | us | set time |
Definition at line 726 of file driver_button.c.
| uint8_t button_set_repeat_time | ( | button_handle_t * | handle, |
| uint32_t | us ) |
set repeat time
| [in] | *handle | pointer to a button handle structure |
| [in] | us | set time |
Definition at line 778 of file driver_button.c.
| uint8_t button_set_short_time | ( | button_handle_t * | handle, |
| uint32_t | us ) |
set short time
| [in] | *handle | pointer to a button handle structure |
| [in] | us | set time |
Definition at line 674 of file driver_button.c.
| uint8_t button_set_timeout | ( | button_handle_t * | handle, |
| uint32_t | us ) |
set timeout
| [in] | *handle | pointer to a button handle structure |
| [in] | us | set time |
Definition at line 570 of file driver_button.c.