Hello
I want to sampling two analog.. with different configuration and handler.
so I set two channels like this.
nrf_saadc_channel_config_t cds_channel_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
err_code = nrf_drv_saadc_init(&cds_saadc_config, cds_saadc_callback);
if(err_code != NRF_SUCCESS) return 1;
err_code = nrf_drv_saadc_channel_init(0, &cds_channel_config);
if(err_code != NRF_SUCCESS) return 1;
///////////////////////////////// (different function)
nrf_saadc_channel_config_t co_channel_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN6);
err_code = nrf_drv_saadc_init(&co_saadc_config, co_saadc_callback);
if(err_code != NRF_SUCCESS) return 1;
err_code = nrf_drv_saadc_channel_init(1, &co_channel_config);
if(err_code != NRF_SUCCESS) return 1;
and then I call only one sample function like this.
void saadc_process()
{
//..
nrf_drv_saadc_sample();
}
Then error occurs. How can I change code?
and is there good example I can refer?
BR,
lyrics



