diff options
| author | Damien George <damien@micropython.org> | 2024-09-02 16:29:49 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-10-15 12:09:48 +1100 |
| commit | a3d1c59ca3db93278624055074af081f8cf747e1 (patch) | |
| tree | 0689650938bba6f8fc8f6a2eb80b02f785092efd | |
| parent | 6d39418f699edc6532d84bf1be53fe8d00d92752 (diff) | |
rp2/machine_pin: Move decl of machine_pin_obj_table to public header.
So other code can include `machine_pin.h` and use the pin name macros such
as `pin_GPIO0`.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/rp2/machine_pin.c | 1 | ||||
| -rw-r--r-- | ports/rp2/machine_pin.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ports/rp2/machine_pin.c b/ports/rp2/machine_pin.c index e1a545a09..79f91232f 100644 --- a/ports/rp2/machine_pin.c +++ b/ports/rp2/machine_pin.c @@ -86,7 +86,6 @@ typedef struct _machine_pin_irq_obj_t { } machine_pin_irq_obj_t; static const mp_irq_methods_t machine_pin_irq_methods; -extern const machine_pin_obj_t machine_pin_obj_table[NUM_BANK0_GPIOS]; // Mask with "1" indicating that the corresponding pin is in simulated open-drain mode. uint64_t machine_pin_open_drain_mask; diff --git a/ports/rp2/machine_pin.h b/ports/rp2/machine_pin.h index 196132019..2d85bdcad 100644 --- a/ports/rp2/machine_pin.h +++ b/ports/rp2/machine_pin.h @@ -64,6 +64,8 @@ extern const mp_obj_type_t machine_pin_af_type; // Include all of the individual pin objects #include "genhdr/pins.h" +extern const machine_pin_obj_t machine_pin_obj_table[NUM_BANK0_GPIOS]; + extern const mp_obj_type_t pin_cpu_pins_obj_type; extern const mp_obj_dict_t machine_pin_cpu_pins_locals_dict; |
