[异常解决] Keil安装好nRF51822开发环境,运行DEMO报错:Error:“GPIOTE_CONFIG_NUM_OF_LOW_POWER_ENVENTS” is undefined
1.问题描述
when compiling "ble_app_proximity" exampled by Nordic, it indicates errors:
"D:\Program Files\MDK5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.0\gpiote\nrf_drv_gpiote.c(30): error: #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined"
"nrf_drv_gpiote_evt_handler_t handlers[NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS];"
and
"D:\Program Files\MDK5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.0\gpiote\nrf_drv_gpiote.c(148): error: #20: identifier "GPIOTE_CONFIG_IRQ_PRIORITY" is undefined"
"nrf_drv_common_irq_enable(GPIOTE_IRQn, GPIOTE_CONFIG_IRQ_PRIORITY);"
2.解决办法
Find nrf_drv_config.h in your project:
Modify following macro will ok:
#define GPIOTE_ENABLED 1
将下面宏改为1即可: