summaryrefslogtreecommitdiff
path: root/esp8266/modpybpin.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-04-22 10:04:12 +0100
committerDamien George <damien.p.george@gmail.com>2016-04-22 10:04:12 +0100
commita2d5d84ecca175fbfbf42e892d6376efd08758eb (patch)
tree5d382b3ba3bf0c489f90577e3401f4a701b532da /esp8266/modpybpin.c
parent624738ca64c71c8f2cccced3fb5d2380bb4ae56b (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/esp8266/modpybpin.c b/esp8266/modpybpin.c
index 2049d4bf3..a65911cbd 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},