diff options
| author | sommersoft <sommersoft@gmail.com> | 2019-02-25 21:22:52 -0600 |
|---|---|---|
| committer | sommersoft <sommersoft@gmail.com> | 2019-02-25 21:22:52 -0600 |
| commit | 4a9f05a44f18615a1adeacfcae329d3090188550 (patch) | |
| tree | c3b0e86c164a3362c2f8bc0fa80a0e329f3881c0 /ports | |
| parent | a8204f1bf9b607ec13f581722b4c2e036f8c34b7 (diff) | |
final re-glue; compiles now.
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index 6b67e014a..211960587 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -146,7 +146,8 @@ void frequencyin_reference_tc_init() { return; } #ifdef SAMD21 - turn_on_clocks(true, reference_tc, 0, TC_HANDLER_FREQUENCYIN); + set_timer_handler(reference_tc, dpll_gclk, TC_HANDLER_FREQUENCYIN); + turn_on_clocks(true, reference_tc, 0); #endif // use the DPLL we setup so that the reference_tc and freqin_tc(s) // are using the same clock frequency. @@ -384,7 +385,7 @@ void common_hal_frequencyio_frequencyin_deinit(frequencyio_frequencyin_obj_t* se if (common_hal_frequencyio_frequencyin_deinited(self)) { return; } - reset_pin(self->pin); + reset_pin_number(self->pin); // turn off EIC & EVSYS utilized by this TC disable_event_channel(self->event_channel); @@ -480,11 +481,11 @@ void common_hal_frequencyio_frequencyin_pause(frequencyio_frequencyin_obj_t* sel #ifdef SAMD21 uint32_t masked_value = EIC->EVCTRL.vec.EXTINTEO; - EIC->EVCTRL.vec.EXTINTEO = masked_value | (0 << self->channel); + EIC->EVCTRL.vec.EXTINTEO = masked_value ^ (1 << self->channel); #endif #ifdef SAMD51 uint32_t masked_value = EIC->EVCTRL.bit.EXTINTEO; - EIC->EVCTRL.bit.EXTINTEO = masked_value | (0 << self->channel); + EIC->EVCTRL.bit.EXTINTEO = masked_value ^ (1 << self->channel); #endif return; } |
