Skip to content

Commit

Permalink
rp2/machine_pin: Move decl of machine_pin_obj_table to public header.
Browse files Browse the repository at this point in the history
So other code can include `machine_pin.h` and use the pin name macros such
as `pin_GPIO0`.

Signed-off-by: Damien George <[email protected]>
  • Loading branch information
dpgeorge committed Oct 15, 2024
1 parent 6d39418 commit a3d1c59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion ports/rp2/machine_pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions ports/rp2/machine_pin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a3d1c59

Please sign in to comment.