/******************************************************************************* ** ** Function nfa_ee_proc_evt ** ** Description Process NFCEE related events from NFC stack ** ** ** Returns None ** *******************************************************************************/ void nfa_ee_proc_evt (tNFC_RESPONSE_EVT event, void *p_data) { tNFA_EE_INT_EVT int_event=0; tNFA_EE_NCI_WAIT_RSP cbk; BT_HDR *p_hdr; switch (event) { case NFC_NFCEE_DISCOVER_REVT: /* 4 NFCEE Discover response */ int_event = NFA_EE_NCI_DISC_RSP_EVT; break; case NFC_NFCEE_INFO_REVT: /* 5 NFCEE Discover Notification */ int_event = NFA_EE_NCI_DISC_NTF_EVT; break; case NFC_NFCEE_MODE_SET_REVT: /* 6 NFCEE Mode Set response */ int_event = NFA_EE_NCI_MODE_SET_RSP_EVT; break; case NFC_EE_ACTION_REVT: int_event = NFA_EE_NCI_ACTION_NTF_EVT; break; case NFC_EE_DISCOVER_REQ_REVT: /* 10 EE Discover Req notification */ int_event = NFA_EE_NCI_DISC_REQ_NTF_EVT; break; case NFC_SET_ROUTING_REVT: int_event = NFA_EE_NCI_WAIT_RSP_EVT; cbk.opcode = NCI_MSG_RF_SET_ROUTING; break; } NFA_TRACE_DEBUG2 ("nfa_ee_proc_evt: event=0x%02x int_event:0x%x", event, int_event); if (int_event) { p_hdr = (BT_HDR *) &cbk; cbk.hdr.event = int_event; cbk.p_data = p_data; nfa_ee_evt_hdlr (p_hdr); } }
/******************************************************************************* ** ** 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); } } } }