summaryrefslogtreecommitdiff
path: root/tests/micropython/const.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-07-15 00:03:59 +1000
committerDamien George <damien@micropython.org>2023-07-20 18:17:36 +1000
commitcb31c0ae9c2a7eaadabfea3939aa8c3a07e36a67 (patch)
tree03f52c95a46f44cbc4bb1644a0de66eccd478b0f /tests/micropython/const.py
parent51c2d26f15c2a737f90f5e4f6581b2588e0930fc (diff)
esp32: Add support for board-named pins and the Pin.board dict.
This adds named-pins support to the esp32 port, following other ports. Since the name of esp32 CPU pins is just GPIOx, where x is an integer, the Pin.cpu dict is not supported and CPU pins are just retrieved via their existing integer "name" (the cost of adding Pin.cpu is about 800 bytes, mostly due to the additional qstrs). What this commit supports is the Pin.board dict and constructing a pin by names given by a board. These names are defined in a pins.csv file at the board level. If no such file exists then Pin.board exists but is empty. As part of this commit, pin and pin IRQ objects are optimised to reduce their size in flash (by removing their gpio_num_t entry). The net change in firmware size for this commit is about -132 bytes. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/micropython/const.py')
0 files changed, 0 insertions, 0 deletions