Yihui Xiong / nrf51822_fix_i2c_spi_conflict

Dependencies:   BLE_API eMPL_MPU6050 nRF51822

Fork of Seeed_Tiny_BLE_Flash by Darren Huang

Committer:
yihui
Date:
Tue Nov 17 07:48:56 2015 +0000
Revision:
5:b8c02645e6af
fix i2c & spi conflict

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yihui 5:b8c02645e6af 1 /* mbed Microcontroller Library
yihui 5:b8c02645e6af 2 * Copyright (c) 2006-2013 ARM Limited
yihui 5:b8c02645e6af 3 *
yihui 5:b8c02645e6af 4 * Licensed under the Apache License, Version 2.0 (the "License");
yihui 5:b8c02645e6af 5 * you may not use this file except in compliance with the License.
yihui 5:b8c02645e6af 6 * You may obtain a copy of the License at
yihui 5:b8c02645e6af 7 *
yihui 5:b8c02645e6af 8 * http://www.apache.org/licenses/LICENSE-2.0
yihui 5:b8c02645e6af 9 *
yihui 5:b8c02645e6af 10 * Unless required by applicable law or agreed to in writing, software
yihui 5:b8c02645e6af 11 * distributed under the License is distributed on an "AS IS" BASIS,
yihui 5:b8c02645e6af 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
yihui 5:b8c02645e6af 13 * See the License for the specific language governing permissions and
yihui 5:b8c02645e6af 14 * limitations under the License.
yihui 5:b8c02645e6af 15 */
yihui 5:b8c02645e6af 16 #ifndef MBED_GPIO_IRQ_API_H
yihui 5:b8c02645e6af 17 #define MBED_GPIO_IRQ_API_H
yihui 5:b8c02645e6af 18
yihui 5:b8c02645e6af 19 #include "device.h"
yihui 5:b8c02645e6af 20
yihui 5:b8c02645e6af 21 #if DEVICE_INTERRUPTIN
yihui 5:b8c02645e6af 22
yihui 5:b8c02645e6af 23 #ifdef __cplusplus
yihui 5:b8c02645e6af 24 extern "C" {
yihui 5:b8c02645e6af 25 #endif
yihui 5:b8c02645e6af 26
yihui 5:b8c02645e6af 27 typedef enum {
yihui 5:b8c02645e6af 28 IRQ_NONE,
yihui 5:b8c02645e6af 29 IRQ_RISE,
yihui 5:b8c02645e6af 30 IRQ_FALL
yihui 5:b8c02645e6af 31 } gpio_irq_event;
yihui 5:b8c02645e6af 32
yihui 5:b8c02645e6af 33 typedef struct gpio_irq_s gpio_irq_t;
yihui 5:b8c02645e6af 34
yihui 5:b8c02645e6af 35 typedef void (*gpio_irq_handler)(uint32_t id, gpio_irq_event event);
yihui 5:b8c02645e6af 36
yihui 5:b8c02645e6af 37 int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id);
yihui 5:b8c02645e6af 38 void gpio_irq_free(gpio_irq_t *obj);
yihui 5:b8c02645e6af 39 void gpio_irq_set (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable);
yihui 5:b8c02645e6af 40 void gpio_irq_enable(gpio_irq_t *obj);
yihui 5:b8c02645e6af 41 void gpio_irq_disable(gpio_irq_t *obj);
yihui 5:b8c02645e6af 42
yihui 5:b8c02645e6af 43 #ifdef __cplusplus
yihui 5:b8c02645e6af 44 }
yihui 5:b8c02645e6af 45 #endif
yihui 5:b8c02645e6af 46
yihui 5:b8c02645e6af 47 #endif
yihui 5:b8c02645e6af 48
yihui 5:b8c02645e6af 49 #endif