mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-13 20:14:40 +00:00
eeprom driver: Refactor where eeprom driver initialisation (and EEPROM emulation initialisation) occurs to make it non-target-specific. (#12671)
This commit is contained in:
parent
23e70fa857
commit
412e7a03e4
2 changed files with 12 additions and 13 deletions
|
@ -94,6 +94,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#ifdef DIP_SWITCH_ENABLE
|
#ifdef DIP_SWITCH_ENABLE
|
||||||
# include "dip_switch.h"
|
# include "dip_switch.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
|
# include "eeprom_stm32.h"
|
||||||
|
#endif
|
||||||
|
#ifdef EEPROM_DRIVER
|
||||||
|
# include "eeprom_driver.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static uint32_t last_input_modification_time = 0;
|
static uint32_t last_input_modification_time = 0;
|
||||||
uint32_t last_input_activity_time(void) { return last_input_modification_time; }
|
uint32_t last_input_activity_time(void) { return last_input_modification_time; }
|
||||||
|
@ -231,6 +237,12 @@ void keyboard_setup(void) {
|
||||||
disable_jtag();
|
disable_jtag();
|
||||||
#endif
|
#endif
|
||||||
print_set_sendchar(sendchar);
|
print_set_sendchar(sendchar);
|
||||||
|
#ifdef STM32_EEPROM_ENABLE
|
||||||
|
EEPROM_Init();
|
||||||
|
#endif
|
||||||
|
#ifdef EEPROM_DRIVER
|
||||||
|
eeprom_driver_init();
|
||||||
|
#endif
|
||||||
matrix_setup();
|
matrix_setup();
|
||||||
keyboard_pre_init_kb();
|
keyboard_pre_init_kb();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,12 +51,6 @@
|
||||||
#ifdef MIDI_ENABLE
|
#ifdef MIDI_ENABLE
|
||||||
# include "qmk_midi.h"
|
# include "qmk_midi.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef STM32_EEPROM_ENABLE
|
|
||||||
# include "eeprom_stm32.h"
|
|
||||||
#endif
|
|
||||||
#ifdef EEPROM_DRIVER
|
|
||||||
# include "eeprom_driver.h"
|
|
||||||
#endif
|
|
||||||
#include "suspend.h"
|
#include "suspend.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
|
||||||
|
@ -150,13 +144,6 @@ int main(void) {
|
||||||
halInit();
|
halInit();
|
||||||
chSysInit();
|
chSysInit();
|
||||||
|
|
||||||
#ifdef STM32_EEPROM_ENABLE
|
|
||||||
EEPROM_Init();
|
|
||||||
#endif
|
|
||||||
#ifdef EEPROM_DRIVER
|
|
||||||
eeprom_driver_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// TESTING
|
// TESTING
|
||||||
// chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
// chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue