/* Function for setting the next background page number.  */
__STATIC_INLINE void next_bkgd_page_number_set(ant_bsc_profile_t *p_profile)
/* Function for setting the next background page number.  */
__STATIC_INLINE void next_bkgd_page_number_set(ant_bsc_profile_t *p_profile)
{
    ant_bsc_page_t last_bkgd_page = 
                p_profile->_cb.p_sens_cb->page_4_present ? ANT_BSC_PAGE_4 : ANT_BSC_PAGE_3;
    ++(p_profile->_cb.p_sens_cb->bkgd_page_number);
    if (p_profile->_cb.p_sens_cb->bkgd_page_number > last_bkgd_page)
    {
        p_profile->_cb.p_sens_cb->bkgd_page_number =
                    p_profile->_cb.p_sens_cb->page_1_present ? ANT_BSC_PAGE_1 : ANT_BSC_PAGE_2;
    }
}