Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_module_encoder.h
1 #ifndef _BC_MODULE_ENCODER_H
2 #define _BC_MODULE_ENCODER_H
3 
4 #include <bc_button.h>
5 
9 
11 
12 typedef enum
13 {
16 
19 
22 
25 
28 
31 
32 
34 
36 
37 void bc_module_encoder_init(void);
38 
40 
41 void bc_module_encoder_deinit(void);
42 
46 
47 void bc_module_encoder_set_event_handler(void (*event_handler)(bc_module_encoder_event_t, void *), void *event_param);
48 
51 
53 
56 
58 
60 
62 
64 
65 #endif // _BC_MODULE_ENCODER_H
bc_button_t * bc_module_encoder_get_button_instance(void)
Get encoder button instance.
bc_module_encoder_event_t
Callback events.
int bc_module_encoder_get_increment(void)
Read encoder delta increment (can be positive or negative number)
bool bc_module_encoder_is_present(void)
Get Encoder Module is pressent, can use without bc_module_encoder_init.
Event error (module is not present)
void bc_module_encoder_init(void)
Initialize Encoder Module.
Event button pressed.
Event button clicked (pressed and released within certain time)
struct bc_button_t bc_button_t
Button instance.
Definition: bc_button.h:32
void bc_module_encoder_set_event_handler(void(*event_handler)(bc_module_encoder_event_t, void *), void *event_param)
Set callback function.
Event button hold (pressed for longer time)
void bc_module_encoder_deinit(void)
Deinitialize Encoder Module.