Firmware SDK
|
Driver for Encoder Module. More...
Enumerations | |
enum | twr_module_encoder_event_t { TWR_MODULE_ENCODER_EVENT_ROTATION = 0 , TWR_MODULE_ENCODER_EVENT_PRESS = 1 , TWR_MODULE_ENCODER_EVENT_RELEASE = 2 , TWR_MODULE_ENCODER_EVENT_CLICK = 3 , TWR_MODULE_ENCODER_EVENT_HOLD = 4 , TWR_MODULE_ENCODER_EVENT_ERROR = 5 } |
Callback events. More... | |
Functions | |
void | twr_module_encoder_init (void) |
Initialize Encoder Module. | |
void | twr_module_encoder_deinit (void) |
Deinitialize Encoder Module. | |
void | twr_module_encoder_set_event_handler (void(*event_handler)(twr_module_encoder_event_t, void *), void *event_param) |
Set callback function. More... | |
twr_button_t * | twr_module_encoder_get_button_instance (void) |
Get encoder button instance. More... | |
int | twr_module_encoder_get_increment (void) |
Read encoder delta increment (can be positive or negative number) More... | |
bool | twr_module_encoder_is_present (void) |
Get Encoder Module is pressent, can use without twr_module_encoder_init. | |
Driver for Encoder Module.
Callback events.
Definition at line 12 of file twr_module_encoder.h.
twr_button_t* twr_module_encoder_get_button_instance | ( | void | ) |
Get encoder button instance.
Definition at line 70 of file twr_module_encoder.c.
int twr_module_encoder_get_increment | ( | void | ) |
Read encoder delta increment (can be positive or negative number)
Definition at line 75 of file twr_module_encoder.c.
void twr_module_encoder_set_event_handler | ( | void(*)(twr_module_encoder_event_t, void *) | event_handler, |
void * | event_param | ||
) |
Set callback function.
[in] | event_handler | Function address |
[in] | event_param | Optional event parameter (can be NULL) |
Definition at line 63 of file twr_module_encoder.c.