File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,15 @@ mp_hal_pin_obj_t machine_pin_get_id(mp_obj_t pin_in);
59
59
#define mp_obj_get_pin (o ) machine_pin_get_id(o) // legacy name; only to support esp8266/modonewire
60
60
#define mp_hal_pin_name (p ) (p)
61
61
static inline void mp_hal_pin_input (mp_hal_pin_obj_t pin ) {
62
+ gpio_pad_select_gpio (pin );
62
63
gpio_set_direction (pin , GPIO_MODE_INPUT );
63
64
}
64
65
static inline void mp_hal_pin_output (mp_hal_pin_obj_t pin ) {
66
+ gpio_pad_select_gpio (pin );
65
67
gpio_set_direction (pin , GPIO_MODE_INPUT_OUTPUT );
66
68
}
67
69
static inline void mp_hal_pin_open_drain (mp_hal_pin_obj_t pin ) {
70
+ gpio_pad_select_gpio (pin );
68
71
gpio_set_direction (pin , GPIO_MODE_INPUT_OUTPUT_OD );
69
72
}
70
73
static inline void mp_hal_pin_od_low (mp_hal_pin_obj_t pin ) {
You can’t perform that action at this time.
0 commit comments