mbed libraries for KL25Z
gpio_irq_api.h@8:c14af7958ef5, 2012-11-09 (annotated)
- Committer:
- emilmont
- Date:
- Fri Nov 09 11:33:53 2012 +0000
- Revision:
- 8:c14af7958ef5
- Parent:
- 7:73c5efe92a6c
- Child:
- 9:663789d7729f
SPI driver; ADC driver; DAC driver; microlib support; general bugfixing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 7:73c5efe92a6c | 1 | /* mbed Microcontroller Library - gpio_irq_api |
emilmont | 7:73c5efe92a6c | 2 | * Copyright (c) 2009-2011 ARM Limited. All rights reserved. |
emilmont | 7:73c5efe92a6c | 3 | */ |
emilmont | 7:73c5efe92a6c | 4 | #ifndef MBED_GPIO_IRQ_API_H |
emilmont | 7:73c5efe92a6c | 5 | #define MBED_GPIO_IRQ_API_H |
emilmont | 7:73c5efe92a6c | 6 | |
emilmont | 7:73c5efe92a6c | 7 | #include "device.h" |
emilmont | 7:73c5efe92a6c | 8 | |
emilmont | 7:73c5efe92a6c | 9 | #if DEVICE_INTERRUPTIN |
emilmont | 7:73c5efe92a6c | 10 | |
emilmont | 7:73c5efe92a6c | 11 | #ifdef __cplusplus |
emilmont | 7:73c5efe92a6c | 12 | extern "C" { |
emilmont | 7:73c5efe92a6c | 13 | #endif |
emilmont | 7:73c5efe92a6c | 14 | |
emilmont | 7:73c5efe92a6c | 15 | typedef enum { |
emilmont | 7:73c5efe92a6c | 16 | IRQ_NONE, |
emilmont | 7:73c5efe92a6c | 17 | IRQ_RISE, |
emilmont | 7:73c5efe92a6c | 18 | IRQ_FALL |
emilmont | 7:73c5efe92a6c | 19 | } gpio_irq_event; |
emilmont | 7:73c5efe92a6c | 20 | |
emilmont | 8:c14af7958ef5 | 21 | typedef struct gpio_irq_object_s gpio_irq_object; |
emilmont | 7:73c5efe92a6c | 22 | |
emilmont | 7:73c5efe92a6c | 23 | typedef void (*gpio_irq_handler)(uint32_t id, gpio_irq_event event); |
emilmont | 7:73c5efe92a6c | 24 | |
emilmont | 7:73c5efe92a6c | 25 | int gpio_irq_init(gpio_irq_object *obj, PinName pin, gpio_irq_handler handler, uint32_t id); |
emilmont | 7:73c5efe92a6c | 26 | void gpio_irq_free(gpio_irq_object *obj); |
emilmont | 7:73c5efe92a6c | 27 | void gpio_irq_set (gpio_irq_object *obj, gpio_irq_event event, uint32_t enable); |
emilmont | 7:73c5efe92a6c | 28 | |
emilmont | 7:73c5efe92a6c | 29 | #ifdef __cplusplus |
emilmont | 7:73c5efe92a6c | 30 | } |
emilmont | 7:73c5efe92a6c | 31 | #endif |
emilmont | 7:73c5efe92a6c | 32 | |
emilmont | 7:73c5efe92a6c | 33 | #endif |
emilmont | 7:73c5efe92a6c | 34 | |
emilmont | 7:73c5efe92a6c | 35 | #endif |