diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2017-10-20 04:49:33 -0700 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2017-10-20 07:49:33 -0400 |
| commit | 536bcb42c9faa5f5af8b0d74abad4758cdcfc66e (patch) | |
| tree | 4f894b3d97eb692882cb02fce1c97e9b3fafe1ef | |
| parent | a800a25e88febe905822534871dae28810c5b024 (diff) | |
atmel-samd: Re-enable pin reset. Fixes #352 (#353)
| -rw-r--r-- | atmel-samd/common-hal/microcontroller/Pin.c | 2 | ||||
| -rw-r--r-- | atmel-samd/supervisor/port.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/atmel-samd/common-hal/microcontroller/Pin.c b/atmel-samd/common-hal/microcontroller/Pin.c index a7b494940..fa6664a17 100644 --- a/atmel-samd/common-hal/microcontroller/Pin.c +++ b/atmel-samd/common-hal/microcontroller/Pin.c @@ -61,7 +61,7 @@ void reset_all_pins(void) { pin_mask[0] &= ~(PORT_PA31); #endif - //gpio_set_port_direction(GPIO_PORTA, pin_mask[0] & ~MICROPY_PORT_A, GPIO_DIRECTION_OFF); + gpio_set_port_direction(GPIO_PORTA, pin_mask[0] & ~MICROPY_PORT_A, GPIO_DIRECTION_OFF); gpio_set_port_direction(GPIO_PORTB, pin_mask[1] & ~MICROPY_PORT_B, GPIO_DIRECTION_OFF); #if PORT_BITS > 64 gpio_set_port_direction(GPIO_PORTC, pin_mask[2] & ~MICROPY_PORT_C, GPIO_DIRECTION_OFF); diff --git a/atmel-samd/supervisor/port.c b/atmel-samd/supervisor/port.c index 4ff5d0e1d..74c79ce3f 100644 --- a/atmel-samd/supervisor/port.c +++ b/atmel-samd/supervisor/port.c @@ -36,6 +36,7 @@ #include "hpl/gclk/hpl_gclk_base.h" #include "hpl/pm/hpl_pm_base.h" +#include "common-hal/microcontroller/Pin.h" #include "tick.h" extern volatile bool mp_msc_enabled; @@ -196,8 +197,8 @@ void reset_port(void) { // // Wait for the DAC to sync then reset. // while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {} // DAC->CTRLA.reg |= DAC_CTRLA_SWRST; -// -// reset_all_pins(); + + reset_all_pins(); // // // usb_hid_reset(); |
