aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/KINETIS/LLD/ext_lld.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-29 09:03:15 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-29 09:03:15 +0000
commitb6467d97b03fbedb1bd430a0914998b6d6298b31 (patch)
tree284e5f2d99ac112de11015c4a8e923ddf30d282f /os/hal/ports/KINETIS/LLD/ext_lld.c
parent46abfd539f96a3aff27b6b38bf9e24b92c0d3917 (diff)
downloadChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.tar.gz
ChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.tar.bz2
ChibiOS-b6467d97b03fbedb1bd430a0914998b6d6298b31.zip
New makefiles in Kinetis demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7827 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/KINETIS/LLD/ext_lld.c')
-rw-r--r--os/hal/ports/KINETIS/LLD/ext_lld.c6
1 files changed, 4 insertions, 2 deletions
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;