Can anyone point me to sample code that exercises ANT's "advanced" burst mode? I have sample code provided by the Keil SDK that contains a prototype for function sd_ant_adv_burst_config_set(), but it would be nice to see this in action.
Thanks!
Can anyone point me to sample code that exercises ANT's "advanced" burst mode? I have sample code provided by the Keil SDK that contains a prototype for function sd_ant_adv_burst_config_set(), but it would be nice to see this in action.
Thanks!
Example init:
static uint8_t burst_setup[BURST_DATA_CONFIG_SIZE] = { ADV_BURST_MODE_ENABLE, ADV_BURST_MODES_MAX_SIZE, 0, 0, 0, 0, 0, 0 };
err_code = sd_ant_adv_burst_config_set(burst_setup, BURST_DATA_CONFIG_SIZE);
APP_ERROR_CHECK(err_code);
static uint8_t burst_wait = 0;
err_code = sd_ant_burst_handler_wait_flag_enable(&burst_wait);
APP_ERROR_CHECK(err_code);
Example usage:
do
{
err_code = sd_ant_burst_handler_request(CHANNEL_0, sizeof(m_burst_data), m_burst_data, BURST_SEGMENT_START);
} while (err_code == NRF_ANT_ERROR_TRANSFER_IN_PROGRESS);
APP_ERROR_CHECK(err_code);
while(burst_wait)
;
err_code = sd_ant_burst_handler_request(CHANNEL_0, sizeof(m_burst_data), m_burst_data, BURST_SEGMENT_CONTINUE);
APP_ERROR_CHECK(err_code);
while(burst_wait)
;
err_code = sd_ant_burst_handler_request(CHANNEL_0, sizeof(m_burst_data), m_burst_data, BURST_SEGMENT_END);
APP_ERROR_CHECK(err_code);
while(burst_wait)
;
Hi, If you review the history of this code then it states that there is a zip file available for download with an example, is this still available?
I have tried to integrate the code above into my project but it just gets flooded with errors regarding undefined/redefined variables. I understand what this code does, I just cannot get it to work.
Cheers,
Darren.
Edit: I have figured out most of the issues but the zip file would still be very useful.
Cheers.
(Sorry, I keep forgetting to check the minor edit box)
The suggested code sends the same packets 3 times, here is an enhanced version: devzone.nordicsemi.com/.../