am trying to synchronize two nrf52840 thank's to state gpio with gpiote function but it return an error code 4 (No Memory for operation) whith this line -> NRF_LOG_INFO("no succes err_code=%d",retval);<- i don't know how to resolve it because i try with app_gpiote_init() but it's the same error
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
static app_gpiote_user_id_t m_example_user_id;
static void example_gpiote_event_handler(uint32_t event_pins_low_to_high, uint32_t event_pin_high_to_low);
bool nrf_drv_gpiote_in_is_set (nrf_drv_gpiote_pin_t pin);
static void gpiote(void){
bool val = nrf_drv_gpiote_init();
uint16_t state = nrf_gpio_pin_read(3);
nrf_drv_gpiote_pin_t pin =3;
nrf_drv_gpiote_in_event_addr_get(pin);
nrf_drv_gpiote_in_event_enable(3,true );
APP_GPIOTE_INIT(GPIOTE_USER_NODE_SIZE );
uint32_t tab[APP_GPIOTE_BUF_SIZE(GPIOTE_USER_NODE_SIZE)] = {0};
app_gpiote_init ( GPIOTE_USER_NODE_SIZE,&tab[0]);
//Size of app_gpiote.gpiote_user_t
NRF_LOG_INFO("%d",GPIOTE_USER_NODE_SIZE);