I have issues initializing interrupts on a pin, i am using newest edition of contiki-ng 4.8, can anyone give a hint on what i am doing wrong.
The target is a CC1312r1 from Texas Instruments.
#include "contiki.h"
#include "dev/gpio-hal.h"
#include "sys/log.h"
#define LOG_MODULE "myapp"
#define LOG_LEVEL LOG_LEVEL_INFO
PROCESS(myapp_process, "My Application Process");
AUTOSTART_PROCESSES(&myapp_process);
PROCESS_THREAD(myapp_process, ev, data)
{
PROCESS_BEGIN();
LOG_INFO("Starting app...\n");
gpio_hal_configure_pin(IOID_30,
GPIO_HAL_PIN_CFG_INPUT |
GPIO_HAL_PIN_CFG_INT_RISING_EDGE);
while(1)
{
PROCESS_YIELD();
// Interrupt occurred, handle it
if (GPIO_HAL_GET_INPUT(IOID_30)) {
LOG_INFO("Interrupt occurred on IOID_30\n");
}
}
PROCESS_END();
}
In addition i have enabled low power mode in the project-conf.h
#define LPM_CONF_ENABLE 1