mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
tools/boardgen.py: Add initial implementation of a common make-pins.py.
For now, this implements the functionality required for esp32 and rp2, including support for numeric pins, rp2 alternate functions, and rp2 extended pins. This also updates the rp2 port to use the same structure for pins.h and pins.csv as for esp32, and moves the pin definitions directly into the table (rather than having a table of pointers), which is a small code size improvement. Support for "hidden" pins in pins.csv is added (matching the stm32 implementation). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
b0aec6a0ff
commit
4bd6ec9ae4
@@ -479,7 +479,6 @@ set(GEN_PINS_PREFIX "${MICROPY_BOARDS_DIR}/rp2_prefix.c")
|
||||
set(GEN_PINS_MKPINS "${MICROPY_BOARDS_DIR}/make-pins.py")
|
||||
set(GEN_PINS_SRC "${CMAKE_BINARY_DIR}/pins_${MICROPY_BOARD}.c")
|
||||
set(GEN_PINS_HDR "${MICROPY_GENHDR_DIR}/pins.h")
|
||||
set(GEN_PINS_AF_CONST "${MICROPY_GENHDR_DIR}/pins_af_const.h")
|
||||
|
||||
if(EXISTS "${MICROPY_BOARDS_DIR}/${MICROPY_BOARD}/pins.csv")
|
||||
set(GEN_PINS_BOARD_CSV "${MICROPY_BOARDS_DIR}/${MICROPY_BOARD}/pins.csv")
|
||||
|
||||
Reference in New Issue
Block a user