nrfx_saadc_multi_channel_ppi/main.c
// Simple function to provide an index to the next input buffer
// Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2
Simple function to provide an index to the next input buffer
Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2
Simple function to provide an index to the next input buffer Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2
static uint32_t next_free_buf_index(void)
{
    static uint32_t buffer_index = -1;
    buffer_index = (buffer_index + 1) % SAADC_BUF_COUNT;
    return buffer_index;
}
static uint32_t next_free_buf_index ( void ) { static uint32_t buffer_index = -1 ; buffer_index = ( buffer_index + 1 ) % SAADC_BUF_COUNT ; return buffer_index ; }
Simple function to provide an index to the next input buffer
Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2
Simple function to provide an index to the next input buffer Will simply alernate between 0 and 1 when SAADC_BUF_COUNT is 2