diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-05-12 12:55:31 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-05-12 13:14:01 -0700 |
| commit | 7ea76e0889d3f11960056cfca3bde77a3b70c33e (patch) | |
| tree | d01549ae0293395e6560c39721969eecb3464962 /atmel-samd/main.c | |
| parent | 6984425f5da415ff232bd93c1b3c3cf10f81c1c2 (diff) | |
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
Diffstat (limited to 'atmel-samd/main.c')
| -rw-r--r-- | atmel-samd/main.c | 10 |
1 files changed, 1 insertions, 9 deletions
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(); |
