Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_irq_api.h
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_irq_api.h
r321 r429 1 2 /** \addtogroup hal */ 3 /** @{*/ 1 4 /* mbed Microcontroller Library 2 5 * Copyright (c) 2006-2013 ARM Limited … … 25 28 #endif 26 29 30 /** GPIO IRQ events 31 */ 27 32 typedef enum { 28 33 IRQ_NONE, … … 31 36 } gpio_irq_event; 32 37 38 /** GPIO IRQ HAL structure. gpio_irq_s is declared in the target's HAL 39 */ 33 40 typedef struct gpio_irq_s gpio_irq_t; 34 41 35 42 typedef void (*gpio_irq_handler)(uint32_t id, gpio_irq_event event); 36 43 37 int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id); 44 /** 45 * \defgroup hal_gpioirq GPIO IRQ HAL functions 46 * @{ 47 */ 48 49 /** Initialize the GPIO IRQ pin 50 * 51 * @param obj The GPIO object to initialize 52 * @param pin The GPIO pin name 53 * @param handler The handler to be attached to GPIO IRQ 54 * @param id The object ID (id != 0, 0 is reserved) 55 * @return -1 if pin is NC, 0 otherwise 56 */ 57 int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id); 58 59 /** Release the GPIO IRQ PIN 60 * 61 * @param obj The gpio object 62 */ 38 63 void gpio_irq_free(gpio_irq_t *obj); 39 void gpio_irq_set (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable); 64 65 /** Enable/disable pin IRQ event 66 * 67 * @param obj The GPIO object 68 * @param event The GPIO IRQ event 69 * @param enable The enable flag 70 */ 71 void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable); 72 73 /** Enable GPIO IRQ 74 * 75 * This is target dependent, as it might enable the entire port or just a pin 76 * @param obj The GPIO object 77 */ 40 78 void gpio_irq_enable(gpio_irq_t *obj); 79 80 /** Disable GPIO IRQ 81 * 82 * This is target dependent, as it might disable the entire port or just a pin 83 * @param obj The GPIO object 84 */ 41 85 void gpio_irq_disable(gpio_irq_t *obj); 86 87 /**@}*/ 42 88 43 89 #ifdef __cplusplus … … 48 94 49 95 #endif 96 97 /** @}*/
Note:
See TracChangeset
for help on using the changeset viewer.