LibDriver MULTI_BUTTON
Loading...
Searching...
No Matches
driver_multi_button_interface_template.c
Go to the documentation of this file.
1
36
38
47{
48 return 0;
49}
50
59{
60 return 0;
61}
62
72uint8_t multi_button_interface_matrix_write_row(uint16_t num, uint8_t level)
73{
74 return 0;
75}
76
85uint8_t multi_button_interface_matrix_read_row(uint32_t *col_array)
86{
87 return 0;
88}
89
102
109{
110
111}
112
118void multi_button_interface_debug_print(const char *const fmt, ...)
119{
120
121}
122
130void multi_button_interface_receive_callback(uint16_t row, uint16_t col, multi_button_t *data)
131{
132 switch (data->status)
133 {
135 {
136 break;
137 }
139 {
140 break;
141 }
143 {
144 multi_button_interface_debug_print("multi_button: row %d col %d irq single click.\n", row, col);
145
146 break;
147 }
149 {
150 multi_button_interface_debug_print("multi_button: row %d col %d irq double click.\n", row, col);
151
152 break;
153 }
155 {
156 multi_button_interface_debug_print("multi_button: row %d col %d irq triple click.\n", row, col);
157
158 break;
159 }
161 {
162 multi_button_interface_debug_print("multi_button: row %d col %d irq repeat click with %d times.\n", row, col, data->times);
163
164 break;
165 }
167 {
168 multi_button_interface_debug_print("multi_button: row %d col %d irq short press start.\n", row, col);
169
170 break;
171 }
173 {
174 multi_button_interface_debug_print("multi_button: row %d col %d irq short press end.\n", row, col);
175
176 break;
177 }
179 {
180 multi_button_interface_debug_print("multi_button: row %d col %d irq long press start.\n", row, col);
181
182 break;
183 }
185 {
186 multi_button_interface_debug_print("multi_button: row %d col %d irq long press hold.\n", row, col);
187
188 break;
189 }
191 {
192 multi_button_interface_debug_print("multi_button: row %d col %d irq long press end.\n", row, col);
193
194 break;
195 }
196 default :
197 {
198 multi_button_interface_debug_print("multi_button: row %d col %d irq unknown status.\n", row, col);
199
200 break;
201 }
202 }
203}
driver multi_button interface header file
struct multi_button_time_s multi_button_time_t
multi_button time structure definition
struct multi_button_s multi_button_t
multi_button structure definition
@ MULTI_BUTTON_STATUS_SHORT_PRESS_END
@ MULTI_BUTTON_STATUS_REPEAT_CLICK
@ MULTI_BUTTON_STATUS_DOUBLE_CLICK
@ MULTI_BUTTON_STATUS_LONG_PRESS_END
@ MULTI_BUTTON_STATUS_SINGLE_CLICK
@ MULTI_BUTTON_STATUS_LONG_PRESS_HOLD
@ MULTI_BUTTON_STATUS_TRIPLE_CLICK
@ MULTI_BUTTON_STATUS_PRESS
@ MULTI_BUTTON_STATUS_SHORT_PRESS_START
@ MULTI_BUTTON_STATUS_RELEASE
@ MULTI_BUTTON_STATUS_LONG_PRESS_START
uint8_t multi_button_interface_matrix_init(void)
interface matrix init
uint8_t multi_button_interface_matrix_write_row(uint16_t num, uint8_t level)
interface matrix write row
void multi_button_interface_receive_callback(uint16_t row, uint16_t col, multi_button_t *data)
interface receive callback
void multi_button_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t multi_button_interface_timestamp_read(multi_button_time_t *t)
interface timestamp read
uint8_t multi_button_interface_matrix_read_row(uint32_t *col_array)
interface matrix read row
void multi_button_interface_delay_ms(uint32_t ms)
interface delay ms
uint8_t multi_button_interface_matrix_deinit(void)
interface matrix deinit