Пример #1
0
/*******************************************************************************
**
** Function         nfa_ee_proc_hci_info_cback
**
** Description      HCI initialization complete from power off sleep mode
**
** Returns          None
**
*******************************************************************************/
void nfa_ee_proc_hci_info_cback (void)
{
    UINT32          xx;
    tNFA_EE_ECB     *p_cb;

    NFA_TRACE_DEBUG0 ("nfa_ee_proc_hci_info_cback ()");
    /* if NFCC power state is change to full power */
    nfa_ee_cb.ee_flags   &= ~NFA_EE_FLAG_WAIT_HCI;

    p_cb = nfa_ee_cb.ecb;
    for (xx = 0; xx < NFA_EE_MAX_EE_SUPPORTED; xx++, p_cb++)
    {
        /* NCI spec says: An NFCEE_DISCOVER_NTF that contains a Protocol type of "HCI Access"
         * SHALL NOT contain any other additional Protocol
         * i.e. check only first supported NFCEE interface is HCI access */
        /* NFA_HCI module handles restoring configurations for HCI access */
        if (p_cb->ee_interface[0] != NFC_NFCEE_INTERFACE_HCI_ACCESS)
        {
            nfa_ee_restore_one_ecb (p_cb);
        }
    }
}
Пример #2
0
/*******************************************************************************
**
** Function         nfa_ee_proc_hci_info_cback
**
** Description      HCI initialization complete from power off sleep mode
**
** Returns          None
**
*******************************************************************************/
void nfa_ee_proc_hci_info_cback (void)
{
    UINT32          xx;
    tNFA_EE_ECB     *p_cb;
    tNFA_EE_MSG     data;

    NFA_TRACE_DEBUG0 ("nfa_ee_proc_hci_info_cback ()");
    /* if NFCC power state is change to full power */
    nfa_ee_cb.ee_flags   &= ~NFA_EE_FLAG_WAIT_HCI;

    p_cb = nfa_ee_cb.ecb;
    for (xx = 0; xx < NFA_EE_MAX_EE_SUPPORTED; xx++, p_cb++)
    {
        /* NCI spec says: An NFCEE_DISCOVER_NTF that contains a Protocol type of "HCI Access"
         * SHALL NOT contain any other additional Protocol
         * i.e. check only first supported NFCEE interface is HCI access */
        /* NFA_HCI module handles restoring configurations for HCI access */
        if (p_cb->ee_interface[0] != NFC_NFCEE_INTERFACE_HCI_ACCESS)
        {
            nfa_ee_restore_one_ecb (p_cb);
        }
    }

    if (nfa_ee_restore_ntf_done())
    {
        nfa_ee_check_restore_complete();
        if (nfa_ee_cb.em_state == NFA_EE_EM_STATE_INIT_DONE)
        {
            if (nfa_ee_cb.discv_timer.in_use)
            {
                nfa_sys_stop_timer (&nfa_ee_cb.discv_timer);
                data.hdr.event = NFA_EE_DISCV_TIMEOUT_EVT;
                nfa_ee_evt_hdlr((BT_HDR *)&data);
            }
        }
    }
}