Dear Members,
I saw this code ,
static void ant_hrm_evt_handler(ant_hrm_profile_t * p_profile, ant_hrm_evt_t event)
{
nrf_pwr_mgmt_feed();
switch (event)
{
case ANT_HRM_PAGE_0_UPDATED:
/* fall through */
case ANT_HRM_PAGE_1_UPDATED:
/* fall through */
case ANT_HRM_PAGE_2_UPDATED:
/* fall through */
case ANT_HRM_PAGE_3_UPDATED:
/* fall through */
case ANT_HRM_PAGE_4_UPDATED:
NRF_LOG_INFO("Page was updated");
break;
default:
break;
}
}static void ant_hrm_evt_handler(ant_hrm_profile_t * p_profile, ant_hrm_evt_t event)
{
nrf_pwr_mgmt_feed();
switch (event)
{
case ANT_HRM_PAGE_0_UPDATED:
/* fall through */
case ANT_HRM_PAGE_1_UPDATED:
/* fall through */
case ANT_HRM_PAGE_2_UPDATED:
/* fall through */
case ANT_HRM_PAGE_3_UPDATED:
/* fall through */
case ANT_HRM_PAGE_4_UPDATED:
NRF_LOG_INFO("Page was updated");
break;
default:
break;
}
}
If there is no input, how can I handle it and display result = 0 and not shutting down CPU ?
How can I display 0 from this code ?
NRF_LOG_INFO("Heart beat count: %u", (unsigned int)p_page_data->beat_count);
NRF_LOG_INFO("Computed heart rate: %u",
(unsigned int) p_page_data->computed_heart_rate);
NRF_LOG_INFO("Heart beat event time: %u.%03us\r\n\n",
(unsigned int) ANT_HRM_BEAT_TIME_SEC(p_page_data->beat_time),
(unsigned int) ANT_HRM_BEAT_TIME_MSEC(p_page_data->beat_time));
If there's no input, the code above never displayed and CPU shut down by itself,
Thanks