Skip to content

Commit 536bcb4

Browse files
tannewtdhalbert
authored andcommitted
atmel-samd: Re-enable pin reset. Fixes adafruit#352 (adafruit#353)
1 parent a800a25 commit 536bcb4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

  • atmel-samd

atmel-samd/common-hal/microcontroller/Pin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void reset_all_pins(void) {
6161
pin_mask[0] &= ~(PORT_PA31);
6262
#endif
6363

64-
//gpio_set_port_direction(GPIO_PORTA, pin_mask[0] & ~MICROPY_PORT_A, GPIO_DIRECTION_OFF);
64+
gpio_set_port_direction(GPIO_PORTA, pin_mask[0] & ~MICROPY_PORT_A, GPIO_DIRECTION_OFF);
6565
gpio_set_port_direction(GPIO_PORTB, pin_mask[1] & ~MICROPY_PORT_B, GPIO_DIRECTION_OFF);
6666
#if PORT_BITS > 64
6767
gpio_set_port_direction(GPIO_PORTC, pin_mask[2] & ~MICROPY_PORT_C, GPIO_DIRECTION_OFF);

atmel-samd/supervisor/port.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "hpl/gclk/hpl_gclk_base.h"
3737
#include "hpl/pm/hpl_pm_base.h"
3838

39+
#include "common-hal/microcontroller/Pin.h"
3940
#include "tick.h"
4041

4142
extern volatile bool mp_msc_enabled;
@@ -196,8 +197,8 @@ void reset_port(void) {
196197
// // Wait for the DAC to sync then reset.
197198
// while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {}
198199
// DAC->CTRLA.reg |= DAC_CTRLA_SWRST;
199-
//
200-
// reset_all_pins();
200+
201+
reset_all_pins();
201202
//
202203
//
203204
// usb_hid_reset();

0 commit comments

Comments
 (0)