Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
bd5152c9
Commit
bd5152c9
authored
Jun 09, 2022
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stm32/mboot: Add board-configurable SysTick hook.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
313f0828
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
ports/stm32/mboot/main.c
ports/stm32/mboot/main.c
+2
-2
ports/stm32/mboot/mboot.h
ports/stm32/mboot/mboot.h
+5
-1
ports/stm32/mboot/ui.c
ports/stm32/mboot/ui.c
+1
-1
No files found.
ports/stm32/mboot/main.c
View file @
bd5152c9
...
...
@@ -1518,9 +1518,9 @@ void SysTick_Handler(void) {
// work properly.
SysTick
->
CTRL
;
//
Update the LED0 state from here to ensure it's consistent
regardless of
//
Run any board-specific code that needs to be done
regardless of
// other processing going on in interrupts or main.
led0_update
();
MBOOT_BOARD_SYSTICK
();
}
#if defined(MBOOT_I2C_SCL)
...
...
ports/stm32/mboot/mboot.h
View file @
bd5152c9
...
...
@@ -54,6 +54,10 @@
#define MBOOT_BOARD_STATE_CHANGE(state, arg) mboot_state_change_default((state), (arg))
#endif
#ifndef MBOOT_BOARD_SYSTICK
#define MBOOT_BOARD_SYSTICK() mboot_ui_systick()
#endif
#ifndef MBOOT_ADDRESS_SPACE_64BIT
#define MBOOT_ADDRESS_SPACE_64BIT (0)
#endif
...
...
@@ -148,7 +152,7 @@ extern uint8_t _estack[ELEM_DATA_SIZE];
void
systick_init
(
void
);
void
led_init
(
void
);
void
led0_update
(
void
);
void
mboot_ui_systick
(
void
);
void
SystemClock_Config
(
void
);
uint32_t
get_le32
(
const
uint8_t
*
b
);
...
...
ports/stm32/mboot/ui.c
View file @
bd5152c9
...
...
@@ -122,7 +122,7 @@ void led0_state(led0_state_t state) {
}
}
void
led0_update
(
void
)
{
void
mboot_ui_systick
(
void
)
{
if
(
led0_cur_state
!=
LED0_STATE_OFF
&&
systick_ms
-
led0_ms_interval
>
50
)
{
uint8_t
rate
=
(
led0_cur_state
>>
2
)
&
0x1f
;
led0_ms_interval
+=
50
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment