1 /* 2 * Copyright (c) 2023, Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_DRIVERS_SPI_NRFX_COMMON_H_ 8 #define ZEPHYR_DRIVERS_SPI_NRFX_COMMON_H_ 9 10 #include <stdint.h> 11 #include <nrfx_gpiote.h> 12 13 #define WAKE_PIN_NOT_USED UINT32_MAX 14 15 #define WAKE_GPIOTE_INSTANCE(node_id) \ 16 COND_CODE_1(DT_NODE_HAS_PROP(node_id, wake_gpios), \ 17 (NRFX_GPIOTE_INSTANCE( \ 18 NRF_DT_GPIOTE_INST(node_id, wake_gpios))), \ 19 ({0})) 20 21 int spi_nrfx_wake_init(const nrfx_gpiote_t *gpiote, uint32_t wake_pin); 22 int spi_nrfx_wake_request(const nrfx_gpiote_t *gpiote, uint32_t wake_pin); 23 24 #endif /* ZEPHYR_DRIVERS_SPI_NRFX_COMMON_H_ */ 25