Skip to content

Commit a3d1c59

Browse files
committed
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>
1 parent 6d39418 commit a3d1c59

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ports/rp2/machine_pin.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ typedef struct _machine_pin_irq_obj_t {
8686
} machine_pin_irq_obj_t;
8787

8888
static const mp_irq_methods_t machine_pin_irq_methods;
89-
extern const machine_pin_obj_t machine_pin_obj_table[NUM_BANK0_GPIOS];
9089

9190
// Mask with "1" indicating that the corresponding pin is in simulated open-drain mode.
9291
uint64_t machine_pin_open_drain_mask;

ports/rp2/machine_pin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ extern const mp_obj_type_t machine_pin_af_type;
6464
// Include all of the individual pin objects
6565
#include "genhdr/pins.h"
6666

67+
extern const machine_pin_obj_t machine_pin_obj_table[NUM_BANK0_GPIOS];
68+
6769
extern const mp_obj_type_t pin_cpu_pins_obj_type;
6870
extern const mp_obj_dict_t machine_pin_cpu_pins_locals_dict;
6971

0 commit comments

Comments
 (0)