mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_STM/TARGET_DISCO_F100RB/gpio_irq_api.c@250:a49055e7a707, 2014-07-08 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Jul 08 11:15:08 2014 +0100
- Revision:
- 250:a49055e7a707
- Parent:
- 163:995a0017c116
- Child:
- 251:de9a1e4ffd79
Synchronized with git revision 3197042b65f8d28e856e1a7812d45e2fbe80e3f1
Full URL: https://github.com/mbedmicro/mbed/commit/3197042b65f8d28e856e1a7812d45e2fbe80e3f1/
error.h -> mbed_error.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 126:549ba18ddd81 | 1 | /* mbed Microcontroller Library |
mbed_official | 126:549ba18ddd81 | 2 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 3 | * Copyright (c) 2014, STMicroelectronics |
mbed_official | 126:549ba18ddd81 | 4 | * All rights reserved. |
mbed_official | 126:549ba18ddd81 | 5 | * |
mbed_official | 126:549ba18ddd81 | 6 | * Redistribution and use in source and binary forms, with or without |
mbed_official | 126:549ba18ddd81 | 7 | * modification, are permitted provided that the following conditions are met: |
mbed_official | 126:549ba18ddd81 | 8 | * |
mbed_official | 126:549ba18ddd81 | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 10 | * this list of conditions and the following disclaimer. |
mbed_official | 126:549ba18ddd81 | 11 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 126:549ba18ddd81 | 12 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 126:549ba18ddd81 | 13 | * and/or other materials provided with the distribution. |
mbed_official | 126:549ba18ddd81 | 14 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 126:549ba18ddd81 | 15 | * may be used to endorse or promote products derived from this software |
mbed_official | 126:549ba18ddd81 | 16 | * without specific prior written permission. |
mbed_official | 126:549ba18ddd81 | 17 | * |
mbed_official | 126:549ba18ddd81 | 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 126:549ba18ddd81 | 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 126:549ba18ddd81 | 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 126:549ba18ddd81 | 21 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 126:549ba18ddd81 | 22 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 126:549ba18ddd81 | 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 126:549ba18ddd81 | 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 126:549ba18ddd81 | 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 126:549ba18ddd81 | 26 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 126:549ba18ddd81 | 27 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 126:549ba18ddd81 | 28 | ******************************************************************************* |
mbed_official | 126:549ba18ddd81 | 29 | */ |
mbed_official | 126:549ba18ddd81 | 30 | #include <stddef.h> |
mbed_official | 126:549ba18ddd81 | 31 | #include "cmsis.h" |
mbed_official | 126:549ba18ddd81 | 32 | |
mbed_official | 126:549ba18ddd81 | 33 | #include "gpio_irq_api.h" |
mbed_official | 126:549ba18ddd81 | 34 | #include "pinmap.h" |
mbed_official | 250:a49055e7a707 | 35 | #include "mbed_error.h" |
mbed_official | 126:549ba18ddd81 | 36 | |
mbed_official | 126:549ba18ddd81 | 37 | #define EDGE_NONE (0) |
mbed_official | 126:549ba18ddd81 | 38 | #define EDGE_RISE (1) |
mbed_official | 126:549ba18ddd81 | 39 | #define EDGE_FALL (2) |
mbed_official | 126:549ba18ddd81 | 40 | #define EDGE_BOTH (3) |
mbed_official | 126:549ba18ddd81 | 41 | |
mbed_official | 163:995a0017c116 | 42 | #define CHANNEL_NUM (16) |
mbed_official | 126:549ba18ddd81 | 43 | |
mbed_official | 163:995a0017c116 | 44 | static uint32_t channel_ids[CHANNEL_NUM] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
mbed_official | 163:995a0017c116 | 45 | static uint32_t channel_gpio[CHANNEL_NUM] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
mbed_official | 163:995a0017c116 | 46 | static uint32_t channel_pin[CHANNEL_NUM] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
mbed_official | 126:549ba18ddd81 | 47 | |
mbed_official | 126:549ba18ddd81 | 48 | static gpio_irq_handler irq_handler; |
mbed_official | 126:549ba18ddd81 | 49 | |
mbed_official | 126:549ba18ddd81 | 50 | static void handle_interrupt_in(uint32_t irq_index) { |
mbed_official | 163:995a0017c116 | 51 | //if irq_index==5 loop exti 5 to 9 |
mbed_official | 163:995a0017c116 | 52 | //if irq_index==10 loop exti 10 to 15 |
mbed_official | 163:995a0017c116 | 53 | //else exti loop one irq_index |
mbed_official | 163:995a0017c116 | 54 | uint32_t to_irq_index=(irq_index==5)?9:((irq_index==10)?15:irq_index); |
mbed_official | 163:995a0017c116 | 55 | GPIO_TypeDef *gpio; |
mbed_official | 163:995a0017c116 | 56 | uint32_t pin; |
mbed_official | 163:995a0017c116 | 57 | do{ |
mbed_official | 163:995a0017c116 | 58 | // Retrieve the gpio and pin that generate the irq |
mbed_official | 163:995a0017c116 | 59 | gpio = (GPIO_TypeDef *)(channel_gpio[irq_index]); |
mbed_official | 163:995a0017c116 | 60 | pin = (uint32_t)(1 << channel_pin[irq_index]); |
mbed_official | 163:995a0017c116 | 61 | // Clear interrupt flag |
mbed_official | 163:995a0017c116 | 62 | if (EXTI_GetITStatus(pin) != RESET) |
mbed_official | 163:995a0017c116 | 63 | { |
mbed_official | 163:995a0017c116 | 64 | EXTI_ClearITPendingBit(pin); |
mbed_official | 163:995a0017c116 | 65 | if (channel_ids[irq_index] == 0) return; |
mbed_official | 163:995a0017c116 | 66 | // Check which edge has generated the irq |
mbed_official | 163:995a0017c116 | 67 | if ((gpio->IDR & pin) == 0) { |
mbed_official | 163:995a0017c116 | 68 | irq_handler(channel_ids[irq_index], IRQ_FALL); |
mbed_official | 163:995a0017c116 | 69 | } else { |
mbed_official | 163:995a0017c116 | 70 | irq_handler(channel_ids[irq_index], IRQ_RISE); |
mbed_official | 163:995a0017c116 | 71 | } |
mbed_official | 163:995a0017c116 | 72 | } |
mbed_official | 163:995a0017c116 | 73 | }while(irq_index++ < to_irq_index); |
mbed_official | 163:995a0017c116 | 74 | } |
mbed_official | 162:937d965048d3 | 75 | |
mbed_official | 126:549ba18ddd81 | 76 | |
mbed_official | 126:549ba18ddd81 | 77 | // The irq_index is passed to the function |
mbed_official | 162:937d965048d3 | 78 | static void gpio_irq0(void) {handle_interrupt_in(0);} // EXTI line 0 |
mbed_official | 162:937d965048d3 | 79 | static void gpio_irq1(void) {handle_interrupt_in(1);} // EXTI line 1 |
mbed_official | 162:937d965048d3 | 80 | static void gpio_irq2(void) {handle_interrupt_in(2);} // EXTI line 2 |
mbed_official | 162:937d965048d3 | 81 | static void gpio_irq3(void) {handle_interrupt_in(3);} // EXTI line 3 |
mbed_official | 162:937d965048d3 | 82 | static void gpio_irq4(void) {handle_interrupt_in(4);} // EXTI line 4 |
mbed_official | 162:937d965048d3 | 83 | static void gpio_irq5(void) {handle_interrupt_in(5);} // EXTI lines 5 to 9 |
mbed_official | 163:995a0017c116 | 84 | static void gpio_irq6(void) {handle_interrupt_in(10);} // EXTI lines 10 to 15 |
mbed_official | 126:549ba18ddd81 | 85 | |
mbed_official | 126:549ba18ddd81 | 86 | extern uint32_t Set_GPIO_Clock(uint32_t port_idx); |
mbed_official | 126:549ba18ddd81 | 87 | |
mbed_official | 126:549ba18ddd81 | 88 | int gpio_irq_init(gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id) { |
mbed_official | 126:549ba18ddd81 | 89 | IRQn_Type irq_n = (IRQn_Type)0; |
mbed_official | 126:549ba18ddd81 | 90 | uint32_t vector = 0; |
mbed_official | 126:549ba18ddd81 | 91 | uint32_t irq_index; |
mbed_official | 126:549ba18ddd81 | 92 | |
mbed_official | 126:549ba18ddd81 | 93 | if (pin == NC) return -1; |
mbed_official | 126:549ba18ddd81 | 94 | |
mbed_official | 126:549ba18ddd81 | 95 | uint32_t port_index = STM_PORT(pin); |
mbed_official | 126:549ba18ddd81 | 96 | uint32_t pin_index = STM_PIN(pin); |
mbed_official | 126:549ba18ddd81 | 97 | |
mbed_official | 126:549ba18ddd81 | 98 | // Select irq number and interrupt routine |
mbed_official | 162:937d965048d3 | 99 | switch (pin_index) { |
mbed_official | 162:937d965048d3 | 100 | case 0: |
mbed_official | 162:937d965048d3 | 101 | irq_n = EXTI0_IRQn; |
mbed_official | 126:549ba18ddd81 | 102 | vector = (uint32_t)&gpio_irq0; |
mbed_official | 126:549ba18ddd81 | 103 | irq_index = 0; |
mbed_official | 126:549ba18ddd81 | 104 | break; |
mbed_official | 162:937d965048d3 | 105 | case 1: |
mbed_official | 162:937d965048d3 | 106 | irq_n = EXTI1_IRQn; |
mbed_official | 126:549ba18ddd81 | 107 | vector = (uint32_t)&gpio_irq1; |
mbed_official | 126:549ba18ddd81 | 108 | irq_index = 1; |
mbed_official | 126:549ba18ddd81 | 109 | break; |
mbed_official | 162:937d965048d3 | 110 | case 2: |
mbed_official | 162:937d965048d3 | 111 | irq_n = EXTI2_IRQn; |
mbed_official | 126:549ba18ddd81 | 112 | vector = (uint32_t)&gpio_irq2; |
mbed_official | 126:549ba18ddd81 | 113 | irq_index = 2; |
mbed_official | 126:549ba18ddd81 | 114 | break; |
mbed_official | 162:937d965048d3 | 115 | case 3: |
mbed_official | 162:937d965048d3 | 116 | irq_n = EXTI3_IRQn; |
mbed_official | 126:549ba18ddd81 | 117 | vector = (uint32_t)&gpio_irq3; |
mbed_official | 126:549ba18ddd81 | 118 | irq_index = 3; |
mbed_official | 126:549ba18ddd81 | 119 | break; |
mbed_official | 162:937d965048d3 | 120 | case 4: |
mbed_official | 162:937d965048d3 | 121 | irq_n = EXTI4_IRQn; |
mbed_official | 162:937d965048d3 | 122 | vector = (uint32_t)&gpio_irq4; |
mbed_official | 162:937d965048d3 | 123 | irq_index = 4; |
mbed_official | 162:937d965048d3 | 124 | break; |
mbed_official | 162:937d965048d3 | 125 | case 5: |
mbed_official | 162:937d965048d3 | 126 | case 6: |
mbed_official | 162:937d965048d3 | 127 | case 7: |
mbed_official | 162:937d965048d3 | 128 | case 8: |
mbed_official | 162:937d965048d3 | 129 | case 9: |
mbed_official | 162:937d965048d3 | 130 | irq_n = EXTI9_5_IRQn; |
mbed_official | 162:937d965048d3 | 131 | vector = (uint32_t)&gpio_irq5; |
mbed_official | 163:995a0017c116 | 132 | irq_index = pin_index; |
mbed_official | 162:937d965048d3 | 133 | break; |
mbed_official | 162:937d965048d3 | 134 | case 10: |
mbed_official | 162:937d965048d3 | 135 | case 11: |
mbed_official | 162:937d965048d3 | 136 | case 12: |
mbed_official | 162:937d965048d3 | 137 | case 13: |
mbed_official | 162:937d965048d3 | 138 | case 14: |
mbed_official | 162:937d965048d3 | 139 | case 15: |
mbed_official | 162:937d965048d3 | 140 | irq_n = EXTI15_10_IRQn; |
mbed_official | 162:937d965048d3 | 141 | vector = (uint32_t)&gpio_irq6; |
mbed_official | 163:995a0017c116 | 142 | irq_index = pin_index; |
mbed_official | 162:937d965048d3 | 143 | break; |
mbed_official | 126:549ba18ddd81 | 144 | default: |
mbed_official | 162:937d965048d3 | 145 | error("InterruptIn error: pin not supported.\n"); |
mbed_official | 126:549ba18ddd81 | 146 | return -1; |
mbed_official | 126:549ba18ddd81 | 147 | } |
mbed_official | 126:549ba18ddd81 | 148 | // Enable GPIO clock |
mbed_official | 126:549ba18ddd81 | 149 | uint32_t gpio_add = Set_GPIO_Clock(port_index); |
mbed_official | 126:549ba18ddd81 | 150 | |
mbed_official | 126:549ba18ddd81 | 151 | // Enable AFIO clock |
mbed_official | 126:549ba18ddd81 | 152 | RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); |
mbed_official | 126:549ba18ddd81 | 153 | |
mbed_official | 126:549ba18ddd81 | 154 | // Connect EXTI line to pin |
mbed_official | 126:549ba18ddd81 | 155 | GPIO_EXTILineConfig(port_index, pin_index); |
mbed_official | 126:549ba18ddd81 | 156 | |
mbed_official | 126:549ba18ddd81 | 157 | // Configure EXTI line |
mbed_official | 126:549ba18ddd81 | 158 | EXTI_InitTypeDef EXTI_InitStructure; |
mbed_official | 126:549ba18ddd81 | 159 | EXTI_InitStructure.EXTI_Line = (uint32_t)(1 << pin_index); |
mbed_official | 126:549ba18ddd81 | 160 | EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; |
mbed_official | 126:549ba18ddd81 | 161 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; |
mbed_official | 126:549ba18ddd81 | 162 | EXTI_InitStructure.EXTI_LineCmd = ENABLE; |
mbed_official | 126:549ba18ddd81 | 163 | EXTI_Init(&EXTI_InitStructure); |
mbed_official | 126:549ba18ddd81 | 164 | |
mbed_official | 126:549ba18ddd81 | 165 | // Enable and set EXTI interrupt to the lowest priority |
mbed_official | 126:549ba18ddd81 | 166 | NVIC_InitTypeDef NVIC_InitStructure; |
mbed_official | 126:549ba18ddd81 | 167 | NVIC_InitStructure.NVIC_IRQChannel = irq_n; |
mbed_official | 126:549ba18ddd81 | 168 | NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F; |
mbed_official | 126:549ba18ddd81 | 169 | NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F; |
mbed_official | 126:549ba18ddd81 | 170 | NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; |
mbed_official | 126:549ba18ddd81 | 171 | NVIC_Init(&NVIC_InitStructure); |
mbed_official | 126:549ba18ddd81 | 172 | |
mbed_official | 126:549ba18ddd81 | 173 | NVIC_SetVector(irq_n, vector); |
mbed_official | 126:549ba18ddd81 | 174 | NVIC_EnableIRQ(irq_n); |
mbed_official | 126:549ba18ddd81 | 175 | |
mbed_official | 126:549ba18ddd81 | 176 | // Save informations for future use |
mbed_official | 126:549ba18ddd81 | 177 | obj->irq_n = irq_n; |
mbed_official | 126:549ba18ddd81 | 178 | obj->irq_index = irq_index; |
mbed_official | 126:549ba18ddd81 | 179 | obj->event = EDGE_NONE; |
mbed_official | 126:549ba18ddd81 | 180 | channel_ids[irq_index] = id; |
mbed_official | 126:549ba18ddd81 | 181 | channel_gpio[irq_index] = gpio_add; |
mbed_official | 126:549ba18ddd81 | 182 | channel_pin[irq_index] = pin_index; |
mbed_official | 126:549ba18ddd81 | 183 | |
mbed_official | 126:549ba18ddd81 | 184 | irq_handler = handler; |
mbed_official | 126:549ba18ddd81 | 185 | |
mbed_official | 126:549ba18ddd81 | 186 | return 0; |
mbed_official | 126:549ba18ddd81 | 187 | } |
mbed_official | 126:549ba18ddd81 | 188 | |
mbed_official | 126:549ba18ddd81 | 189 | void gpio_irq_free(gpio_irq_t *obj) { |
mbed_official | 126:549ba18ddd81 | 190 | channel_ids[obj->irq_index] = 0; |
mbed_official | 126:549ba18ddd81 | 191 | channel_gpio[obj->irq_index] = 0; |
mbed_official | 126:549ba18ddd81 | 192 | channel_pin[obj->irq_index] = 0; |
mbed_official | 126:549ba18ddd81 | 193 | // Disable EXTI line |
mbed_official | 126:549ba18ddd81 | 194 | EXTI_InitTypeDef EXTI_InitStructure; |
mbed_official | 126:549ba18ddd81 | 195 | EXTI_StructInit(&EXTI_InitStructure); |
mbed_official | 126:549ba18ddd81 | 196 | EXTI_Init(&EXTI_InitStructure); |
mbed_official | 126:549ba18ddd81 | 197 | obj->event = EDGE_NONE; |
mbed_official | 126:549ba18ddd81 | 198 | } |
mbed_official | 126:549ba18ddd81 | 199 | |
mbed_official | 126:549ba18ddd81 | 200 | void gpio_irq_set(gpio_irq_t *obj, gpio_irq_event event, uint32_t enable) { |
mbed_official | 126:549ba18ddd81 | 201 | EXTI_InitTypeDef EXTI_InitStructure; |
mbed_official | 126:549ba18ddd81 | 202 | |
mbed_official | 126:549ba18ddd81 | 203 | uint32_t pin_index = channel_pin[obj->irq_index]; |
mbed_official | 126:549ba18ddd81 | 204 | |
mbed_official | 126:549ba18ddd81 | 205 | EXTI_InitStructure.EXTI_Line = (uint32_t)(1 << pin_index); |
mbed_official | 126:549ba18ddd81 | 206 | EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; |
mbed_official | 126:549ba18ddd81 | 207 | |
mbed_official | 126:549ba18ddd81 | 208 | if (event == IRQ_RISE) { |
mbed_official | 126:549ba18ddd81 | 209 | if ((obj->event == EDGE_FALL) || (obj->event == EDGE_BOTH)) { |
mbed_official | 126:549ba18ddd81 | 210 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling; |
mbed_official | 126:549ba18ddd81 | 211 | obj->event = EDGE_BOTH; |
mbed_official | 126:549ba18ddd81 | 212 | } |
mbed_official | 126:549ba18ddd81 | 213 | else { // NONE or RISE |
mbed_official | 126:549ba18ddd81 | 214 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; |
mbed_official | 126:549ba18ddd81 | 215 | obj->event = EDGE_RISE; |
mbed_official | 126:549ba18ddd81 | 216 | } |
mbed_official | 126:549ba18ddd81 | 217 | } |
mbed_official | 126:549ba18ddd81 | 218 | |
mbed_official | 126:549ba18ddd81 | 219 | if (event == IRQ_FALL) { |
mbed_official | 126:549ba18ddd81 | 220 | if ((obj->event == EDGE_RISE) || (obj->event == EDGE_BOTH)) { |
mbed_official | 126:549ba18ddd81 | 221 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling; |
mbed_official | 126:549ba18ddd81 | 222 | obj->event = EDGE_BOTH; |
mbed_official | 126:549ba18ddd81 | 223 | } |
mbed_official | 126:549ba18ddd81 | 224 | else { // NONE or FALL |
mbed_official | 126:549ba18ddd81 | 225 | EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; |
mbed_official | 126:549ba18ddd81 | 226 | obj->event = EDGE_FALL; |
mbed_official | 126:549ba18ddd81 | 227 | } |
mbed_official | 126:549ba18ddd81 | 228 | } |
mbed_official | 126:549ba18ddd81 | 229 | |
mbed_official | 126:549ba18ddd81 | 230 | if (enable) { |
mbed_official | 126:549ba18ddd81 | 231 | EXTI_InitStructure.EXTI_LineCmd = ENABLE; |
mbed_official | 126:549ba18ddd81 | 232 | } |
mbed_official | 126:549ba18ddd81 | 233 | else { |
mbed_official | 126:549ba18ddd81 | 234 | EXTI_InitStructure.EXTI_LineCmd = DISABLE; |
mbed_official | 126:549ba18ddd81 | 235 | } |
mbed_official | 126:549ba18ddd81 | 236 | |
mbed_official | 126:549ba18ddd81 | 237 | EXTI_Init(&EXTI_InitStructure); |
mbed_official | 126:549ba18ddd81 | 238 | } |
mbed_official | 126:549ba18ddd81 | 239 | |
mbed_official | 126:549ba18ddd81 | 240 | void gpio_irq_enable(gpio_irq_t *obj) { |
mbed_official | 126:549ba18ddd81 | 241 | NVIC_EnableIRQ(obj->irq_n); |
mbed_official | 126:549ba18ddd81 | 242 | } |
mbed_official | 126:549ba18ddd81 | 243 | |
mbed_official | 126:549ba18ddd81 | 244 | void gpio_irq_disable(gpio_irq_t *obj) { |
mbed_official | 126:549ba18ddd81 | 245 | NVIC_DisableIRQ(obj->irq_n); |
mbed_official | 126:549ba18ddd81 | 246 | obj->event = EDGE_NONE; |
mbed_official | 126:549ba18ddd81 | 247 | } |