2525
2626#define LEN (x ) (sizeof(x) / sizeof(x[0]))
2727
28- bool bmp_config_overwrite (bmp_api_config_t const * const config_on_storage ,
29- bmp_api_config_t * const keyboard_config ) {
30- // User can overwrite partial settings
31- keyboard_config -> mode = config_on_storage -> mode ;
32- keyboard_config -> startup = config_on_storage -> startup ;
33- keyboard_config -> matrix .debounce = config_on_storage -> matrix .debounce ;
34- keyboard_config -> matrix .is_left_hand =
35- config_on_storage -> matrix .is_left_hand ;
36- keyboard_config -> param_central = config_on_storage -> param_central ;
37- keyboard_config -> param_peripheral = config_on_storage -> param_peripheral ;
38- keyboard_config -> keymap = config_on_storage -> keymap ;
39- keyboard_config -> reserved [2 ] = config_on_storage -> reserved [2 ];
40-
41- return true;
42- }
28+ // bool bmp_config_overwrite(bmp_api_config_t const *const config_on_storage,
29+ // bmp_api_config_t *const keyboard_config) {
30+ // // User can overwrite partial settings
31+ // keyboard_config->mode = config_on_storage->mode;
32+ // keyboard_config->startup = config_on_storage->startup;
33+ // keyboard_config->matrix.debounce = config_on_storage->matrix.debounce;
34+ // keyboard_config->matrix.is_left_hand =
35+ // config_on_storage->matrix.is_left_hand;
36+ // keyboard_config->param_central = config_on_storage->param_central;
37+ // keyboard_config->param_peripheral = config_on_storage->param_peripheral;
38+ // keyboard_config->keymap = config_on_storage->keymap;
39+ // keyboard_config->reserved[2] = config_on_storage->reserved[2];
40+ //
41+ // return true;
42+ // }
4343
4444static void create_status_file () {}
4545
@@ -51,8 +51,8 @@ void keyboard_post_init_kb() {
5151 debug_mouse = false;
5252}
5353
54- uint8_t buf [256 ];
55- uint8_t widx , ridx , cnt ;
54+ static uint8_t buf [256 ];
55+ static uint8_t widx , ridx , cnt ;
5656
5757void uart_recv_callback (uint8_t dat ) {
5858 buf [widx ] = dat ;
@@ -71,6 +71,8 @@ uint8_t uart_getchar() {
7171 return c ;
7272}
7373
74+ void uart_flush_rx_buffer () { BMPAPI -> uart .send (NULL , 0 ); }
75+
7476void qt_matrix_init () {
7577 bmp_uart_config_t uart_config ;
7678 uart_config .tx_pin = 1 ;
0 commit comments