diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-22 10:04:12 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-22 10:04:12 +0100 |
commit | a2d5d84ecca175fbfbf42e892d6376efd08758eb (patch) | |
tree | 5d382b3ba3bf0c489f90577e3401f4a701b532da /esp8266/modpybpin.c | |
parent | 624738ca64c71c8f2cccced3fb5d2380bb4ae56b (diff) | |
download | micropython-a2d5d84ecca175fbfbf42e892d6376efd08758eb.tar.gz micropython-a2d5d84ecca175fbfbf42e892d6376efd08758eb.zip |
esp8266: Convert mp_hal_pin_obj_t from pin ptr to simple integer.
Most pin I/O can be done just knowing the pin number as a simple
integer, and it's more efficient this way (code size, speed) because it
doesn't require a memory lookup to get the pin id from the pin object.
If the full pin object is needed then it can be easily looked up in the
pin table.
Diffstat (limited to 'esp8266/modpybpin.c')
-rw-r--r-- | esp8266/modpybpin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/modpybpin.c b/esp8266/modpybpin.c index 2049d4bf34..a65911cbd1 100644 --- a/esp8266/modpybpin.c +++ b/esp8266/modpybpin.c @@ -59,7 +59,7 @@ typedef struct _pin_irq_obj_t { uint16_t phys_port; } pin_irq_obj_t; -STATIC const pyb_pin_obj_t pyb_pin_obj[16 + 1] = { +const pyb_pin_obj_t pyb_pin_obj[16 + 1] = { {{&pyb_pin_type}, 0, FUNC_GPIO0, PERIPHS_IO_MUX_GPIO0_U}, {{&pyb_pin_type}, 1, FUNC_GPIO1, PERIPHS_IO_MUX_U0TXD_U}, {{&pyb_pin_type}, 2, FUNC_GPIO2, PERIPHS_IO_MUX_GPIO2_U}, |