テスト用です。

Dependencies:   mbed

Committer:
jksoft
Date:
Tue Oct 11 11:09:42 2016 +0000
Revision:
0:8468a4403fea
SB??ver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8468a4403fea 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8468a4403fea 2 *
jksoft 0:8468a4403fea 3 * The information contained herein is property of Nordic Semiconductor ASA.
jksoft 0:8468a4403fea 4 * Terms and conditions of usage are described in detail in NORDIC
jksoft 0:8468a4403fea 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8468a4403fea 6 *
jksoft 0:8468a4403fea 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8468a4403fea 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8468a4403fea 9 * the file.
jksoft 0:8468a4403fea 10 *
jksoft 0:8468a4403fea 11 */
jksoft 0:8468a4403fea 12
jksoft 0:8468a4403fea 13 #if NEED_APP_GPIOTE /* disabled by default */
jksoft 0:8468a4403fea 14
jksoft 0:8468a4403fea 15 #include "app_gpiote.h"
jksoft 0:8468a4403fea 16 #include <stdlib.h>
jksoft 0:8468a4403fea 17 #include <string.h>
jksoft 0:8468a4403fea 18 #include "app_util.h"
jksoft 0:8468a4403fea 19 #include "app_util_platform.h"
jksoft 0:8468a4403fea 20 #include "nrf_error.h"
jksoft 0:8468a4403fea 21 #include "nrf_gpio.h"
jksoft 0:8468a4403fea 22
jksoft 0:8468a4403fea 23
jksoft 0:8468a4403fea 24 /**@brief GPIOTE user type. */
jksoft 0:8468a4403fea 25 typedef struct
jksoft 0:8468a4403fea 26 {
jksoft 0:8468a4403fea 27 uint32_t pins_mask; /**< Mask defining which pins user wants to monitor. */
jksoft 0:8468a4403fea 28 uint32_t pins_low_to_high_mask; /**< Mask defining which pins will generate events to this user when toggling low->high. */
jksoft 0:8468a4403fea 29 uint32_t pins_high_to_low_mask; /**< Mask defining which pins will generate events to this user when toggling high->low. */
jksoft 0:8468a4403fea 30 uint32_t sense_high_pins; /**< Mask defining which pins are configured to generate GPIOTE interrupt on transition to high level. */
jksoft 0:8468a4403fea 31 app_gpiote_event_handler_t event_handler; /**< Pointer to function to be executed when an event occurs. */
jksoft 0:8468a4403fea 32 } gpiote_user_t;
jksoft 0:8468a4403fea 33
jksoft 0:8468a4403fea 34 STATIC_ASSERT(sizeof(gpiote_user_t) <= GPIOTE_USER_NODE_SIZE);
jksoft 0:8468a4403fea 35 STATIC_ASSERT(sizeof(gpiote_user_t) % 4 == 0);
jksoft 0:8468a4403fea 36
jksoft 0:8468a4403fea 37 static uint32_t m_enabled_users_mask; /**< Mask for tracking which users are enabled. */
jksoft 0:8468a4403fea 38 static uint8_t m_user_array_size; /**< Size of user array. */
jksoft 0:8468a4403fea 39 static uint8_t m_user_count; /**< Number of registered users. */
jksoft 0:8468a4403fea 40 static gpiote_user_t * mp_users = NULL; /**< Array of GPIOTE users. */
jksoft 0:8468a4403fea 41
jksoft 0:8468a4403fea 42
jksoft 0:8468a4403fea 43 /**@brief Function for toggling sense level for specified pins.
jksoft 0:8468a4403fea 44 *
jksoft 0:8468a4403fea 45 * @param[in] p_user Pointer to user structure.
jksoft 0:8468a4403fea 46 * @param[in] pins Bitmask specifying for which pins the sense level is to be toggled.
jksoft 0:8468a4403fea 47 */
jksoft 0:8468a4403fea 48 static void sense_level_toggle(gpiote_user_t * p_user, uint32_t pins)
jksoft 0:8468a4403fea 49 {
jksoft 0:8468a4403fea 50 uint32_t pin_no;
jksoft 0:8468a4403fea 51
jksoft 0:8468a4403fea 52 for (pin_no = 0; pin_no < NO_OF_PINS; pin_no++)
jksoft 0:8468a4403fea 53 {
jksoft 0:8468a4403fea 54 uint32_t pin_mask = (1 << pin_no);
jksoft 0:8468a4403fea 55
jksoft 0:8468a4403fea 56 if ((pins & pin_mask) != 0)
jksoft 0:8468a4403fea 57 {
jksoft 0:8468a4403fea 58 uint32_t sense;
jksoft 0:8468a4403fea 59
jksoft 0:8468a4403fea 60 // Invert sensing.
jksoft 0:8468a4403fea 61 if ((p_user->sense_high_pins & pin_mask) == 0)
jksoft 0:8468a4403fea 62 {
jksoft 0:8468a4403fea 63 sense = GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos;
jksoft 0:8468a4403fea 64 p_user->sense_high_pins |= pin_mask;
jksoft 0:8468a4403fea 65 }
jksoft 0:8468a4403fea 66 else
jksoft 0:8468a4403fea 67 {
jksoft 0:8468a4403fea 68 sense = GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos;
jksoft 0:8468a4403fea 69 p_user->sense_high_pins &= ~pin_mask;
jksoft 0:8468a4403fea 70 }
jksoft 0:8468a4403fea 71
jksoft 0:8468a4403fea 72 NRF_GPIO->PIN_CNF[pin_no] &= ~GPIO_PIN_CNF_SENSE_Msk;
jksoft 0:8468a4403fea 73 NRF_GPIO->PIN_CNF[pin_no] |= sense;
jksoft 0:8468a4403fea 74 }
jksoft 0:8468a4403fea 75 }
jksoft 0:8468a4403fea 76 }
jksoft 0:8468a4403fea 77
jksoft 0:8468a4403fea 78
jksoft 0:8468a4403fea 79 /**@brief Function for handling the GPIOTE interrupt.
jksoft 0:8468a4403fea 80 */
jksoft 0:8468a4403fea 81 void GPIOTE_IRQHandler(void)
jksoft 0:8468a4403fea 82 {
jksoft 0:8468a4403fea 83 uint8_t i;
jksoft 0:8468a4403fea 84 uint32_t pins_changed;
jksoft 0:8468a4403fea 85 uint32_t pins_state = NRF_GPIO->IN;
jksoft 0:8468a4403fea 86
jksoft 0:8468a4403fea 87 // Clear event.
jksoft 0:8468a4403fea 88 NRF_GPIOTE->EVENTS_PORT = 0;
jksoft 0:8468a4403fea 89
jksoft 0:8468a4403fea 90 // Check all users.
jksoft 0:8468a4403fea 91 for (i = 0; i < m_user_count; i++)
jksoft 0:8468a4403fea 92 {
jksoft 0:8468a4403fea 93 gpiote_user_t * p_user = &mp_users[i];
jksoft 0:8468a4403fea 94
jksoft 0:8468a4403fea 95 // Check if user is enabled.
jksoft 0:8468a4403fea 96 if (((1 << i) & m_enabled_users_mask) != 0)
jksoft 0:8468a4403fea 97 {
jksoft 0:8468a4403fea 98 uint32_t transition_pins;
jksoft 0:8468a4403fea 99 uint32_t event_low_to_high;
jksoft 0:8468a4403fea 100 uint32_t event_high_to_low;
jksoft 0:8468a4403fea 101
jksoft 0:8468a4403fea 102 // Find set of pins on which there has been a transition.
jksoft 0:8468a4403fea 103 transition_pins = (pins_state ^ ~p_user->sense_high_pins) & p_user->pins_mask;
jksoft 0:8468a4403fea 104
jksoft 0:8468a4403fea 105 // Toggle SENSE level for all pins that have changed state.
jksoft 0:8468a4403fea 106 sense_level_toggle(p_user, transition_pins);
jksoft 0:8468a4403fea 107
jksoft 0:8468a4403fea 108 // Second read after setting sense.
jksoft 0:8468a4403fea 109 // Check if any pins have changed while serving this interrupt.
jksoft 0:8468a4403fea 110 pins_changed = NRF_GPIO->IN ^ pins_state;
jksoft 0:8468a4403fea 111 if (pins_changed)
jksoft 0:8468a4403fea 112 {
jksoft 0:8468a4403fea 113 // Transition pins detected in late stage.
jksoft 0:8468a4403fea 114 uint32_t late_transition_pins;
jksoft 0:8468a4403fea 115
jksoft 0:8468a4403fea 116 pins_state |= pins_changed;
jksoft 0:8468a4403fea 117
jksoft 0:8468a4403fea 118 // Find set of pins on which there has been a transition.
jksoft 0:8468a4403fea 119 late_transition_pins = (pins_state ^ ~p_user->sense_high_pins) & p_user->pins_mask;
jksoft 0:8468a4403fea 120
jksoft 0:8468a4403fea 121 // Toggle SENSE level for all pins that have changed state in last phase.
jksoft 0:8468a4403fea 122 sense_level_toggle(p_user, late_transition_pins);
jksoft 0:8468a4403fea 123
jksoft 0:8468a4403fea 124 // Update pins that has changed state since the interrupt occurred.
jksoft 0:8468a4403fea 125 transition_pins |= late_transition_pins;
jksoft 0:8468a4403fea 126 }
jksoft 0:8468a4403fea 127
jksoft 0:8468a4403fea 128 // Call user event handler if an event has occurred.
jksoft 0:8468a4403fea 129 event_high_to_low = (~pins_state & p_user->pins_high_to_low_mask) & transition_pins;
jksoft 0:8468a4403fea 130 event_low_to_high = (pins_state & p_user->pins_low_to_high_mask) & transition_pins;
jksoft 0:8468a4403fea 131
jksoft 0:8468a4403fea 132 if ((event_low_to_high | event_high_to_low) != 0)
jksoft 0:8468a4403fea 133 {
jksoft 0:8468a4403fea 134 p_user->event_handler(event_low_to_high, event_high_to_low);
jksoft 0:8468a4403fea 135 }
jksoft 0:8468a4403fea 136 }
jksoft 0:8468a4403fea 137 }
jksoft 0:8468a4403fea 138 }
jksoft 0:8468a4403fea 139
jksoft 0:8468a4403fea 140
jksoft 0:8468a4403fea 141 /**@brief Function for sense disabling for all pins for specified user.
jksoft 0:8468a4403fea 142 *
jksoft 0:8468a4403fea 143 * @param[in] user_id User id.
jksoft 0:8468a4403fea 144 */
jksoft 0:8468a4403fea 145 static void pins_sense_disable(app_gpiote_user_id_t user_id)
jksoft 0:8468a4403fea 146 {
jksoft 0:8468a4403fea 147 uint32_t pin_no;
jksoft 0:8468a4403fea 148
jksoft 0:8468a4403fea 149 for (pin_no = 0; pin_no < 32; pin_no++)
jksoft 0:8468a4403fea 150 {
jksoft 0:8468a4403fea 151 if ((mp_users[user_id].pins_mask & (1 << pin_no)) != 0)
jksoft 0:8468a4403fea 152 {
jksoft 0:8468a4403fea 153 NRF_GPIO->PIN_CNF[pin_no] &= ~GPIO_PIN_CNF_SENSE_Msk;
jksoft 0:8468a4403fea 154 NRF_GPIO->PIN_CNF[pin_no] |= GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos;
jksoft 0:8468a4403fea 155 }
jksoft 0:8468a4403fea 156 }
jksoft 0:8468a4403fea 157 }
jksoft 0:8468a4403fea 158
jksoft 0:8468a4403fea 159
jksoft 0:8468a4403fea 160 uint32_t app_gpiote_init(uint8_t max_users, void * p_buffer)
jksoft 0:8468a4403fea 161 {
jksoft 0:8468a4403fea 162 if (p_buffer == NULL)
jksoft 0:8468a4403fea 163 {
jksoft 0:8468a4403fea 164 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 165 }
jksoft 0:8468a4403fea 166
jksoft 0:8468a4403fea 167 // Check that buffer is correctly aligned.
jksoft 0:8468a4403fea 168 if (!is_word_aligned(p_buffer))
jksoft 0:8468a4403fea 169 {
jksoft 0:8468a4403fea 170 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 171 }
jksoft 0:8468a4403fea 172
jksoft 0:8468a4403fea 173 // Initialize file globals.
jksoft 0:8468a4403fea 174 mp_users = (gpiote_user_t *)p_buffer;
jksoft 0:8468a4403fea 175 m_user_array_size = max_users;
jksoft 0:8468a4403fea 176 m_user_count = 0;
jksoft 0:8468a4403fea 177 m_enabled_users_mask = 0;
jksoft 0:8468a4403fea 178
jksoft 0:8468a4403fea 179 memset(mp_users, 0, m_user_array_size * sizeof(gpiote_user_t));
jksoft 0:8468a4403fea 180
jksoft 0:8468a4403fea 181 // Initialize GPIOTE interrupt (will not be enabled until app_gpiote_user_enable() is called).
jksoft 0:8468a4403fea 182 NRF_GPIOTE->INTENCLR = 0xFFFFFFFF;
jksoft 0:8468a4403fea 183
jksoft 0:8468a4403fea 184 NVIC_ClearPendingIRQ(GPIOTE_IRQn);
jksoft 0:8468a4403fea 185 NVIC_SetPriority(GPIOTE_IRQn, APP_IRQ_PRIORITY_HIGH);
jksoft 0:8468a4403fea 186 NVIC_EnableIRQ(GPIOTE_IRQn);
jksoft 0:8468a4403fea 187
jksoft 0:8468a4403fea 188 return NRF_SUCCESS;
jksoft 0:8468a4403fea 189 }
jksoft 0:8468a4403fea 190
jksoft 0:8468a4403fea 191
jksoft 0:8468a4403fea 192 uint32_t app_gpiote_user_register(app_gpiote_user_id_t * p_user_id,
jksoft 0:8468a4403fea 193 uint32_t pins_low_to_high_mask,
jksoft 0:8468a4403fea 194 uint32_t pins_high_to_low_mask,
jksoft 0:8468a4403fea 195 app_gpiote_event_handler_t event_handler)
jksoft 0:8468a4403fea 196 {
jksoft 0:8468a4403fea 197 // Check state and parameters.
jksoft 0:8468a4403fea 198 if (mp_users == NULL)
jksoft 0:8468a4403fea 199 {
jksoft 0:8468a4403fea 200 return NRF_ERROR_INVALID_STATE;
jksoft 0:8468a4403fea 201 }
jksoft 0:8468a4403fea 202 if (event_handler == NULL)
jksoft 0:8468a4403fea 203 {
jksoft 0:8468a4403fea 204 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 205 }
jksoft 0:8468a4403fea 206 if (m_user_count >= m_user_array_size)
jksoft 0:8468a4403fea 207 {
jksoft 0:8468a4403fea 208 return NRF_ERROR_NO_MEM;
jksoft 0:8468a4403fea 209 }
jksoft 0:8468a4403fea 210
jksoft 0:8468a4403fea 211 // Allocate new user.
jksoft 0:8468a4403fea 212 mp_users[m_user_count].pins_mask = pins_low_to_high_mask | pins_high_to_low_mask;
jksoft 0:8468a4403fea 213 mp_users[m_user_count].pins_low_to_high_mask = pins_low_to_high_mask;
jksoft 0:8468a4403fea 214 mp_users[m_user_count].pins_high_to_low_mask = pins_high_to_low_mask;
jksoft 0:8468a4403fea 215 mp_users[m_user_count].event_handler = event_handler;
jksoft 0:8468a4403fea 216
jksoft 0:8468a4403fea 217 *p_user_id = m_user_count++;
jksoft 0:8468a4403fea 218
jksoft 0:8468a4403fea 219 // Make sure SENSE is disabled for all pins.
jksoft 0:8468a4403fea 220 pins_sense_disable(*p_user_id);
jksoft 0:8468a4403fea 221
jksoft 0:8468a4403fea 222 return NRF_SUCCESS;
jksoft 0:8468a4403fea 223 }
jksoft 0:8468a4403fea 224
jksoft 0:8468a4403fea 225
jksoft 0:8468a4403fea 226 uint32_t app_gpiote_user_enable(app_gpiote_user_id_t user_id)
jksoft 0:8468a4403fea 227 {
jksoft 0:8468a4403fea 228 uint32_t pin_no;
jksoft 0:8468a4403fea 229 uint32_t pins_state;
jksoft 0:8468a4403fea 230
jksoft 0:8468a4403fea 231 // Check state and parameters.
jksoft 0:8468a4403fea 232 if (mp_users == NULL)
jksoft 0:8468a4403fea 233 {
jksoft 0:8468a4403fea 234 return NRF_ERROR_INVALID_STATE;
jksoft 0:8468a4403fea 235 }
jksoft 0:8468a4403fea 236 if (user_id >= m_user_count)
jksoft 0:8468a4403fea 237 {
jksoft 0:8468a4403fea 238 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 239 }
jksoft 0:8468a4403fea 240
jksoft 0:8468a4403fea 241 // Clear any pending event.
jksoft 0:8468a4403fea 242 NRF_GPIOTE->EVENTS_PORT = 0;
jksoft 0:8468a4403fea 243 pins_state = NRF_GPIO->IN;
jksoft 0:8468a4403fea 244
jksoft 0:8468a4403fea 245 // Enable user.
jksoft 0:8468a4403fea 246 if (m_enabled_users_mask == 0)
jksoft 0:8468a4403fea 247 {
jksoft 0:8468a4403fea 248 NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Msk;
jksoft 0:8468a4403fea 249 }
jksoft 0:8468a4403fea 250 m_enabled_users_mask |= (1 << user_id);
jksoft 0:8468a4403fea 251
jksoft 0:8468a4403fea 252 // Enable sensing for all pins for specified user.
jksoft 0:8468a4403fea 253 mp_users[user_id].sense_high_pins = 0;
jksoft 0:8468a4403fea 254 for (pin_no = 0; pin_no < 32; pin_no++)
jksoft 0:8468a4403fea 255 {
jksoft 0:8468a4403fea 256 uint32_t pin_mask = (1 << pin_no);
jksoft 0:8468a4403fea 257
jksoft 0:8468a4403fea 258 if ((mp_users[user_id].pins_mask & pin_mask) != 0)
jksoft 0:8468a4403fea 259 {
jksoft 0:8468a4403fea 260 uint32_t sense;
jksoft 0:8468a4403fea 261
jksoft 0:8468a4403fea 262 if ((pins_state & pin_mask) != 0)
jksoft 0:8468a4403fea 263 {
jksoft 0:8468a4403fea 264 sense = GPIO_PIN_CNF_SENSE_Low << GPIO_PIN_CNF_SENSE_Pos;
jksoft 0:8468a4403fea 265 }
jksoft 0:8468a4403fea 266 else
jksoft 0:8468a4403fea 267 {
jksoft 0:8468a4403fea 268 sense = GPIO_PIN_CNF_SENSE_High << GPIO_PIN_CNF_SENSE_Pos;
jksoft 0:8468a4403fea 269 mp_users[user_id].sense_high_pins |= pin_mask;
jksoft 0:8468a4403fea 270 }
jksoft 0:8468a4403fea 271
jksoft 0:8468a4403fea 272 NRF_GPIO->PIN_CNF[pin_no] &= ~GPIO_PIN_CNF_SENSE_Msk;
jksoft 0:8468a4403fea 273 NRF_GPIO->PIN_CNF[pin_no] |= sense;
jksoft 0:8468a4403fea 274 }
jksoft 0:8468a4403fea 275 }
jksoft 0:8468a4403fea 276
jksoft 0:8468a4403fea 277 return NRF_SUCCESS;
jksoft 0:8468a4403fea 278 }
jksoft 0:8468a4403fea 279
jksoft 0:8468a4403fea 280
jksoft 0:8468a4403fea 281 uint32_t app_gpiote_user_disable(app_gpiote_user_id_t user_id)
jksoft 0:8468a4403fea 282 {
jksoft 0:8468a4403fea 283 // Check state and parameters.
jksoft 0:8468a4403fea 284 if (mp_users == NULL)
jksoft 0:8468a4403fea 285 {
jksoft 0:8468a4403fea 286 return NRF_ERROR_INVALID_STATE;
jksoft 0:8468a4403fea 287 }
jksoft 0:8468a4403fea 288 if (user_id >= m_user_count)
jksoft 0:8468a4403fea 289 {
jksoft 0:8468a4403fea 290 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 291 }
jksoft 0:8468a4403fea 292
jksoft 0:8468a4403fea 293 // Disable sensing for all pins for specified user.
jksoft 0:8468a4403fea 294 pins_sense_disable(user_id);
jksoft 0:8468a4403fea 295
jksoft 0:8468a4403fea 296 // Disable user.
jksoft 0:8468a4403fea 297 m_enabled_users_mask &= ~(1UL << user_id);
jksoft 0:8468a4403fea 298 if (m_enabled_users_mask == 0)
jksoft 0:8468a4403fea 299 {
jksoft 0:8468a4403fea 300 NRF_GPIOTE->INTENCLR = GPIOTE_INTENSET_PORT_Msk;
jksoft 0:8468a4403fea 301 }
jksoft 0:8468a4403fea 302
jksoft 0:8468a4403fea 303 return NRF_SUCCESS;
jksoft 0:8468a4403fea 304 }
jksoft 0:8468a4403fea 305
jksoft 0:8468a4403fea 306
jksoft 0:8468a4403fea 307 uint32_t app_gpiote_pins_state_get(app_gpiote_user_id_t user_id, uint32_t * p_pins)
jksoft 0:8468a4403fea 308 {
jksoft 0:8468a4403fea 309 gpiote_user_t * p_user;
jksoft 0:8468a4403fea 310
jksoft 0:8468a4403fea 311 // Check state and parameters.
jksoft 0:8468a4403fea 312 if (mp_users == NULL)
jksoft 0:8468a4403fea 313 {
jksoft 0:8468a4403fea 314 return NRF_ERROR_INVALID_STATE;
jksoft 0:8468a4403fea 315 }
jksoft 0:8468a4403fea 316 if (user_id >= m_user_count)
jksoft 0:8468a4403fea 317 {
jksoft 0:8468a4403fea 318 return NRF_ERROR_INVALID_PARAM;
jksoft 0:8468a4403fea 319 }
jksoft 0:8468a4403fea 320
jksoft 0:8468a4403fea 321 // Get pins.
jksoft 0:8468a4403fea 322 p_user = &mp_users[user_id];
jksoft 0:8468a4403fea 323 *p_pins = NRF_GPIO->IN & p_user->pins_mask;
jksoft 0:8468a4403fea 324
jksoft 0:8468a4403fea 325 return NRF_SUCCESS;
jksoft 0:8468a4403fea 326 }
jksoft 0:8468a4403fea 327
jksoft 0:8468a4403fea 328 #if defined(SVCALL_AS_NORMAL_FUNCTION) || defined(SER_CONNECTIVITY)
jksoft 0:8468a4403fea 329 uint32_t app_gpiote_input_event_handler_register(const uint8_t channel,
jksoft 0:8468a4403fea 330 const uint32_t pin,
jksoft 0:8468a4403fea 331 const uint32_t polarity,
jksoft 0:8468a4403fea 332 app_gpiote_input_event_handler_t event_handler)
jksoft 0:8468a4403fea 333 {
jksoft 0:8468a4403fea 334 (void)sense_level_toggle(NULL, pin);
jksoft 0:8468a4403fea 335 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 336 }
jksoft 0:8468a4403fea 337
jksoft 0:8468a4403fea 338 uint32_t app_gpiote_input_event_handler_unregister(const uint8_t channel)
jksoft 0:8468a4403fea 339 {
jksoft 0:8468a4403fea 340 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 341 }
jksoft 0:8468a4403fea 342
jksoft 0:8468a4403fea 343 uint32_t app_gpiote_end_irq_event_handler_register(app_gpiote_input_event_handler_t event_handler)
jksoft 0:8468a4403fea 344 {
jksoft 0:8468a4403fea 345 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 346 }
jksoft 0:8468a4403fea 347
jksoft 0:8468a4403fea 348 uint32_t app_gpiote_end_irq_event_handler_unregister(void)
jksoft 0:8468a4403fea 349 {
jksoft 0:8468a4403fea 350 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 351 }
jksoft 0:8468a4403fea 352
jksoft 0:8468a4403fea 353 uint32_t app_gpiote_enable_interrupts(void)
jksoft 0:8468a4403fea 354 {
jksoft 0:8468a4403fea 355 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 356 }
jksoft 0:8468a4403fea 357
jksoft 0:8468a4403fea 358 uint32_t app_gpiote_disable_interrupts(void)
jksoft 0:8468a4403fea 359 {
jksoft 0:8468a4403fea 360 return NRF_ERROR_NOT_SUPPORTED;
jksoft 0:8468a4403fea 361 }
jksoft 0:8468a4403fea 362 #endif // SVCALL_AS_NORMAL_FUNCTION || SER_CONNECTIVITY
jksoft 0:8468a4403fea 363
jksoft 0:8468a4403fea 364 #endif // #if NEED_APP_GPIOTE