This website requires JavaScript.
Explore
Help
Register
Sign In
fengqi
/
lv_micropython
Watch
1
Star
0
Fork
0
You've already forked lv_micropython
Code
Issues
Pull Requests
1
Actions
Packages
Projects
Releases
Wiki
Activity
lv_micropython
/
ports
/
esp32
/
boards
/
pins_prefix.c
5 lines
101 B
C
Raw
Permalink
Normal View
History
Unescape
Escape
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>
2023-07-15 00:03:59 +10:00
#
include
"py/obj.h"
extmod/modmachine: Clean up decls of machine types to use common ones. The machine_i2c_type, machine_spi_type and machine_timer_type symbols are already declared in extmod/modmachine.h and should not be declared anywhere else. Also move declarations of machine_pin_type and machine_rtc_type to the common header in extmod. Signed-off-by: Damien George <damien@micropython.org>
2023-10-26 11:39:40 +11:00
#
include
"extmod/modmachine.h"
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>
2023-07-15 00:03:59 +10:00
#
include
"machine_pin.h"
#
include
"genhdr/pins.h"
Reference in New Issue
Copy Permalink