File tree 1 file changed +2
-2
lines changed
ports/atmel-samd/common-hal/digitalio 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ void common_hal_digitalio_digitalinout_switch_to_output(
72
72
gpio_set_pin_direction (pin , GPIO_DIRECTION_OUT );
73
73
74
74
// Turn on "strong" pin driving (more current available). See DRVSTR doc in datasheet.
75
- hri_port_set_PINCFG_DRVSTR_bit (PORT , (enum gpio_port )GPIO_PORT (pin ), pin );
75
+ hri_port_set_PINCFG_DRVSTR_bit (PORT , (enum gpio_port )GPIO_PORT (pin ), GPIO_PIN ( pin ) );
76
76
77
77
self -> output = true;
78
78
self -> open_drain = drive_mode == DRIVE_MODE_OPEN_DRAIN ;
@@ -158,7 +158,7 @@ digitalio_pull_t common_hal_digitalio_digitalinout_get_pull(
158
158
mp_raise_AttributeError ("Cannot get pull while in output mode" );
159
159
return PULL_NONE ;
160
160
} else {
161
- if (hri_port_get_PINCFG_PULLEN_bit (PORT , (enum gpio_port )GPIO_PORT (pin ), pin ) == 0 ) {
161
+ if (hri_port_get_PINCFG_PULLEN_bit (PORT , (enum gpio_port )GPIO_PORT (pin ), GPIO_PIN ( pin ) ) == 0 ) {
162
162
return PULL_NONE ;
163
163
} if (hri_port_get_OUT_reg (PORT , (enum gpio_port )GPIO_PORT (pin ), 1U << GPIO_PIN (pin )) > 0 ) {
164
164
return PULL_UP ;
You can’t perform that action at this time.
0 commit comments