atmel-samd: Re-enable pin reset. Fixes #352 (#353)

This commit is contained in:
Scott Shawcroft 2017-10-20 04:49:33 -07:00 committed by Dan Halbert
parent a800a25e88
commit 536bcb42c9
2 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -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();