Hi all, I'm developing software for nRF52832.
It includes function of SAADC.
My saadc_callback function is below.
void saadc_callback(nrf_drv_saadc_evt_t const * p_event) { if (p_event->type == NRF_DRV_SAADC_EVT_DONE) { ret_code_t err_code; buffer_number ^= 0x01; //XOR saadc_event_callback = true; err_code = nrf_drv_saadc_buffer_convert(p_event->data.done.p_buffer, SAMPLES_IN_BUFFER); APP_ERROR_CHECK(err_code); } }
It fills buffer at that time.
However, I'm wondering if I can put modified numbers in the buffer, not original A-D converted one.
For example, the original converted number is 100.
But I want to add 2^10 to 100 and put new number into buffer, not original. (So in buffer, there is 2^10 + 100, not 100).
Is there anyone knows how to to that?
I can't modify them after filling the buffer because I want to change the numbers depends on their states. (as time goes on, states will be changed).
Thanks for reading this article.!