Hello,
I'm using nRF SDK 15.0. I'm trying to use SAADC peripheral in my code. My primary code is based on "ble_app_template". I have added several services which are working fine.
I have copied the SAADC code from the saadc example in the peripheral folder of SDK. The code is as it is. I can compile the SAADC example individually but when try to use this code in the BLE project, it gives errors (as below).
Kindly let me know what needs to be changed/adjusted. I need at least two analog inputs.
Compiling ‘main.c’
implicit declaration of function 'saadc_init'; did you mean 'gatt_init'? [-Wimplicit-function-declaration]
'Output/xxx_s132_nrf52832 Debug/Obj/SEGGER_RTT.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/SEGGER_RTT_Syscalls_SES.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/SEGGER_RTT_printf.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_advdata.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_advertising.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_conn_params.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_conn_state.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_srv_common.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/gatt_cache_manager.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/gatts_cache_manager.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/id_manager.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/nrf_ble_gatt.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/nrf_ble_qwr.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/peer_data_storage.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/peer_database.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/peer_id.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/peer_manager.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/pm_buffer.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/pm_mutex.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/security_dispatcher.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/security_manager.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/ble_bas.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/nrf_sdh.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/nrf_sdh_ble.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/nrf_sdh_soc.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/cue_service.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/rgb_service.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/bat_service.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/cmd_service.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/cue_driver.o' is up to date
'Output/xxx_s132_nrf52832 Debug/Obj/rgb_driver.o' is up to date
Output/xxx_s132_nrf52832 Debug/Obj/adc_driver.o does not exist.
Compiling ‘adc_driver.c’
nrfx.h
nrfx_saadc.h
nrf_drv_saadc.h
adc_driver.c
'NRFX_TIMER0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER3_INST_IDX'?
in definition of macro 'NRFX_CONCAT_3_'
in expansion of macro 'NRFX_CONCAT_3'
in expansion of macro 'NRFX_TIMER_INSTANCE'
in expansion of macro 'NRF_DRV_TIMER_INSTANCE'
Build failed