X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Flpc%2Fao_exti_lpc.c;h=12016072f7037e625c5006708fc4c39f507ee88f;hb=6aeb000899ad7f22e92b487b5891664554bc4d33;hp=941aa965dde3d7b8c7723c6aad94e16544dd31a9;hpb=14790172e02d4e1624c35797f87ffd94345d54ff;p=fw%2Faltos diff --git a/src/lpc/ao_exti_lpc.c b/src/lpc/ao_exti_lpc.c index 941aa965..12016072 100644 --- a/src/lpc/ao_exti_lpc.c +++ b/src/lpc/ao_exti_lpc.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -69,7 +70,7 @@ _ao_exti_set_enable(uint8_t pint) lpc_gpio_pin.sienr = mask; else lpc_gpio_pin.cienr = mask; - + if (mode & AO_EXTI_MODE_FALLING) lpc_gpio_pin.sienf = mask; else @@ -98,7 +99,7 @@ ao_exti_setup (uint8_t port, uint8_t pin, uint8_t mode, void (*callback)(void)) mask = (1 << pint); ao_pint_inuse |= mask; ao_pint_enabled &= ~mask; - + ao_pint_map[id] = pint; ao_exti_callback[pint] = callback; @@ -139,7 +140,7 @@ ao_exti_set_mode(uint8_t port, uint8_t pin, uint8_t mode) } void -ao_exti_set_callback(uint8_t port, uint8_t pin, void (*callback)()) { +ao_exti_set_callback(uint8_t port, uint8_t pin, void (*callback)(void)) { uint8_t id = pin_id(port,pin); uint8_t pint = ao_pint_map[id];