From 7ea76e0889d3f11960056cfca3bde77a3b70c33e Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 12 May 2017 12:55:31 -0700 Subject: atmel-samd: Pin reset improvements. * Reset SWD lines to SWD rather than GPIO. This makes OpenOCD happier. * Default speaker enable lines to False for CircuitPlayground to prevent the speaker from buzzing when no sound is playing. Fixes #126 --- atmel-samd/main.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'atmel-samd/main.c') diff --git a/atmel-samd/main.c b/atmel-samd/main.c index 6184d64eb..da9c08019 100644 --- a/atmel-samd/main.c +++ b/atmel-samd/main.c @@ -172,15 +172,7 @@ void reset_samd21(void) { while (DAC->STATUS.reg & DAC_STATUS_SYNCBUSY) {} DAC->CTRLA.reg |= DAC_CTRLA_SWRST; - // Reset pins - struct system_pinmux_config config; - system_pinmux_get_config_defaults(&config); - config.powersave = true; - - uint32_t pin_mask[2] = PORT_OUT_IMPLEMENTED; - - system_pinmux_group_set_config(&(PORT->Group[0]), pin_mask[0] & ~MICROPY_PORT_A, &config); - system_pinmux_group_set_config(&(PORT->Group[1]), pin_mask[1] & ~MICROPY_PORT_B, &config); + reset_all_pins(); audioout_reset(); pwmout_reset(); -- cgit v1.2.3