summaryrefslogtreecommitdiff
path: root/ports/atmel-samd/common-hal/countio/Counter.c
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-05-30 10:44:13 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.com>2020-06-03 10:56:35 +0100
commitdd5d7c86d22807c021dd1711eb7dd3daebc5cfcf (patch)
treedde417af2cae8cb1797582d6489eab9cb9caeddf /ports/atmel-samd/common-hal/countio/Counter.c
parent60df6170cc5d0e495fde9613c05c55b64189b425 (diff)
Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
Diffstat (limited to 'ports/atmel-samd/common-hal/countio/Counter.c')
-rw-r--r--ports/atmel-samd/common-hal/countio/Counter.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ports/atmel-samd/common-hal/countio/Counter.c b/ports/atmel-samd/common-hal/countio/Counter.c
index db5b325b8..d2e3fae63 100644
--- a/ports/atmel-samd/common-hal/countio/Counter.c
+++ b/ports/atmel-samd/common-hal/countio/Counter.c
@@ -25,20 +25,20 @@ void common_hal_countio_counter_construct(countio_counter_obj_t* self,
// These default settings apply when the EIC isn't yet enabled.
self->eic_channel_a = pin_a->extint_channel;
-
+
self->pin_a = pin_a->number;
-
+
gpio_set_pin_function(self->pin_a, GPIO_PIN_FUNCTION_A);
gpio_set_pin_pull_mode(self->pin_a, GPIO_PULL_UP);
set_eic_channel_data(self->eic_channel_a, (void*) self);
self->count = 0;
-
+
claim_pin(pin_a);
-
-
+
+
set_eic_handler(self->eic_channel_a, EIC_HANDLER_COUNTER);
turn_on_eic_channel(self->eic_channel_a, EIC_CONFIG_SENSE0_FALL_Val);
@@ -77,7 +77,7 @@ void common_hal_countio_counter_reset(countio_counter_obj_t* self){
void counter_interrupt_handler(uint8_t channel) {
countio_counter_obj_t* self = get_eic_channel_data(channel);
-
+
self->count += 1;
-
+
}