/* Function for finding and setting advertisement timing configuration.  */
static void adv_timing_set(void)
/* Function for finding and setting advertisement timing configuration.  */
static void adv_timing_set(void)
{
    ret_code_t            err_code;
    const es_slot_reg_t * p_reg = es_slot_get_registry();
    es_adv_timing_resolver_input_t resolver_input = {
        .adv_interval             = m_current_adv_interval,
        .p_result                 = &m_adv_timing_result,
        .num_slots_configured     = p_reg->num_configured_slots,
        .p_slots_configured       = p_reg->slots_configured,
        .num_eid_slots_configured = p_reg->num_configured_eid_slots,
        .p_eid_slots_configured   = p_reg->eid_slots_configured,
        .tlm_configured           = p_reg->tlm_configured,
        .tlm_slot                 = p_reg->tlm_slot};
    err_code = es_adv_timing_resolve(&resolver_input);
    APP_ERROR_CHECK(err_code);
}