diff options
author | Damien George <damien@micropython.org> | 2021-09-22 00:00:26 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-09-24 12:23:14 +1000 |
commit | f046b50ca591e16f78ffaae3c45a19afaeba839b (patch) | |
tree | 6768809b885d6b5118e95cf84cbe392d1b4878eb /extmod/machine_pwm.h | |
parent | 4fdf795efa4eca3a9f8166e33b991a762569ae20 (diff) | |
download | micropython-f046b50ca591e16f78ffaae3c45a19afaeba839b.tar.gz micropython-f046b50ca591e16f78ffaae3c45a19afaeba839b.zip |
esp32/main: Add option for a board to hook code into startup sequence.
To do this the board must define MICROPY_BOARD_STARTUP, set
MICROPY_SOURCE_BOARD then define the new start-up code.
For example, in mpconfigboard.h:
#define MICROPY_BOARD_STARTUP board_startup
void board_startup(void);
in mpconfigboard.cmake:
set(MICROPY_SOURCE_BOARD
${MICROPY_BOARD_DIR}/board.c
)
and in a new board.c file in the board directory:
#include "py/mpconfig.h"
void board_startup(void) {
boardctrl_startup();
// extra custom startup
}
This follows stm32's boardctrl facilities.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/machine_pwm.h')
0 files changed, 0 insertions, 0 deletions