File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1518,9 +1518,9 @@ void SysTick_Handler(void) {
1518
1518
// work properly.
1519
1519
SysTick -> CTRL ;
1520
1520
1521
- // Update the LED0 state from here to ensure it's consistent regardless of
1521
+ // Run any board-specific code that needs to be done regardless of
1522
1522
// other processing going on in interrupts or main.
1523
- led0_update ();
1523
+ MBOOT_BOARD_SYSTICK ();
1524
1524
}
1525
1525
1526
1526
#if defined(MBOOT_I2C_SCL )
Original file line number Diff line number Diff line change 54
54
#define MBOOT_BOARD_STATE_CHANGE (state , arg ) mboot_state_change_default((state), (arg))
55
55
#endif
56
56
57
+ #ifndef MBOOT_BOARD_SYSTICK
58
+ #define MBOOT_BOARD_SYSTICK () mboot_ui_systick()
59
+ #endif
60
+
57
61
#ifndef MBOOT_ADDRESS_SPACE_64BIT
58
62
#define MBOOT_ADDRESS_SPACE_64BIT (0)
59
63
#endif
@@ -148,7 +152,7 @@ extern uint8_t _estack[ELEM_DATA_SIZE];
148
152
149
153
void systick_init (void );
150
154
void led_init (void );
151
- void led0_update (void );
155
+ void mboot_ui_systick (void );
152
156
void SystemClock_Config (void );
153
157
154
158
uint32_t get_le32 (const uint8_t * b );
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ void led0_state(led0_state_t state) {
122
122
}
123
123
}
124
124
125
- void led0_update (void ) {
125
+ void mboot_ui_systick (void ) {
126
126
if (led0_cur_state != LED0_STATE_OFF && systick_ms - led0_ms_interval > 50 ) {
127
127
uint8_t rate = (led0_cur_state >> 2 ) & 0x1f ;
128
128
led0_ms_interval += 50 ;
You can’t perform that action at this time.
0 commit comments