mbed(SerialHalfDuplex入り)
Fork of mbed by
gpio_irq_api.h
- Committer:
- emilmont
- Date:
- 2013-01-18
- Revision:
- 57:0480438fc29c
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
File content as of revision 57:0480438fc29c:
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #ifndef MBED_GPIO_IRQ_API_H #define MBED_GPIO_IRQ_API_H #include "device.h" #if DEVICE_INTERRUPTIN #ifdef __cplusplus extern "C" { #endif typedef enum { IRQ_NONE, IRQ_RISE, IRQ_FALL } gpio_irq_event; typedef struct gpio_irq_s gpio_irq_t; typedef void (*gpio_irq_handler)(uint32_t id, gpio_irq_event event); int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id); void gpio_irq_free(gpio_irq_t *obj); void gpio_irq_set (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable); #ifdef __cplusplus } #endif #endif #endif