@@ -387,6 +387,20 @@ int parse_qmk_config(void)
387387 }
388388
389389 BMPAPI -> logger .info ("Update tapping term" );
390+
391+ // copy settings to bootloader region
392+ bmp_qmk_config_t * p_qmk_config ;
393+ uint32_t qmk_config_file_len ;
394+ BMPAPI -> app .get_file (QMK_RECORD , (uint8_t * * )& p_qmk_config , & qmk_config_file_len );
395+ if (p_qmk_config == NULL )
396+ {
397+ BMPAPI -> app .save_file (QMK_RECORD );
398+ BMPAPI -> app .get_file (QMK_RECORD , (uint8_t * * )& p_qmk_config , & qmk_config_file_len );
399+ if (p_qmk_config == NULL ) return 1 ;
400+ }
401+
402+ memcpy (p_qmk_config , & bmp_qmk_config , sizeof (bmp_qmk_config ));
403+
390404 return 0 ;
391405}
392406
@@ -887,18 +901,6 @@ int load_tapping_term_file()
887901
888902int save_tapping_term_file ()
889903{
890- bmp_qmk_config_t * p_qmk_config ;
891- uint32_t qmk_config_file_len ;
892- BMPAPI -> app .get_file (QMK_RECORD , (uint8_t * * )& p_qmk_config , & qmk_config_file_len );
893- if (p_qmk_config == NULL )
894- {
895- BMPAPI -> app .save_file (QMK_RECORD );
896- BMPAPI -> app .get_file (QMK_RECORD , (uint8_t * * )& p_qmk_config , & qmk_config_file_len );
897- if (p_qmk_config == NULL ) return 1 ;
898- }
899-
900- memcpy (p_qmk_config , & bmp_qmk_config , sizeof (bmp_qmk_config ));
901-
902904 return BMPAPI -> app .save_file (QMK_RECORD );
903905}
904906
0 commit comments