From b6467d97b03fbedb1bd430a0914998b6d6298b31 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 29 Mar 2015 09:03:15 +0000 Subject: New makefiles in Kinetis demos. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/KINETIS/LLD/ext_lld.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'os/hal/ports/KINETIS/LLD/ext_lld.c') diff --git a/os/hal/ports/KINETIS/LLD/ext_lld.c b/os/hal/ports/KINETIS/LLD/ext_lld.c index 5e2ae19e0..8bd85403e 100644 --- a/os/hal/ports/KINETIS/LLD/ext_lld.c +++ b/os/hal/ports/KINETIS/LLD/ext_lld.c @@ -135,12 +135,13 @@ static void ext_lld_exti_irq_disable(void) { * Generic interrupt handler. */ static inline void irq_handler(PORT_TypeDef * const port, const unsigned port_width, const uint8_t *channel_map) { + unsigned pin; uint32_t isfr = port->ISFR; /* Clear all pending interrupts on this port. */ port->ISFR = 0xFFFFFFFF; - for (unsigned pin = 0; pin < port_width; pin++) { + for (pin = 0; pin < port_width; pin++) { if (isfr & (1 << pin)) { expchannel_t channel = channel_map[pin]; EXTD1.config->channels[channel].cb(&EXTD1, channel); @@ -246,12 +247,13 @@ void ext_lld_init(void) { * @notapi */ void ext_lld_start(EXTDriver *extp) { + expchannel_t channel; if (extp->state == EXT_STOP) ext_lld_exti_irq_enable(); /* Configuration of automatic channels.*/ - for (expchannel_t channel = 0; channel < EXT_MAX_CHANNELS; channel++) { + for (channel = 0; channel < EXT_MAX_CHANNELS; channel++) { uint32_t mode = extp->config->channels[channel].mode; PORT_TypeDef *port = extp->config->channels[channel].port; -- cgit v1.2.3