Home
last modified time | relevance | path

Searched refs:conn_id (Results 1 – 25 of 33) sorted by relevance

12

/system/nfc/src/nfc/nfc/
Dnfc_utils.cc51 if (nfc_cb.conn_cb[xx].conn_id == NFC_ILLEGAL_CONN_ID) { in nfc_alloc_conn_cb()
52 nfc_cb.conn_cb[xx].conn_id = in nfc_alloc_conn_cb()
72 void nfc_set_conn_id(tNFC_CONN_CB* p_cb, uint8_t conn_id) { in nfc_set_conn_id() argument
77 p_cb->conn_id = conn_id; in nfc_set_conn_id()
79 nfc_cb.conn_id[conn_id] = handle; in nfc_set_conn_id()
80 LOG(VERBOSE) << StringPrintf("nfc_set_conn_id conn_id:%d, handle:%d", conn_id, in nfc_set_conn_id()
117 tNFC_CONN_CB* nfc_find_conn_cb_by_conn_id(uint8_t conn_id) { in nfc_find_conn_cb_by_conn_id() argument
123 if (conn_id == NFC_PEND_CONN_ID) { in nfc_find_conn_cb_by_conn_id()
125 if (nfc_cb.conn_cb[xx].conn_id == NFC_PEND_CONN_ID) { in nfc_find_conn_cb_by_conn_id()
131 id = conn_id & NFC_CONN_ID_ID_MASK; in nfc_find_conn_cb_by_conn_id()
[all …]
Dnfc_ncif.cc150 uint8_t hdr0 = p_cb->conn_id; in nfc_ncif_send_data()
155 p_cb->conn_id, p_cb->num_buff, p_cb->tx_q.count); in nfc_ncif_send_data()
588 void nfc_ncif_error_status(uint8_t conn_id, uint8_t status) { in nfc_ncif_error_status() argument
589 tNFC_CONN_CB* p_cb = nfc_find_conn_cb_by_conn_id(conn_id); in nfc_ncif_error_status()
593 (*p_cb->p_cback)(conn_id, NFC_ERROR_CEVT, &nfc_conn); in nfc_ncif_error_status()
1522 uint8_t conn_id; in nfc_ncif_proc_conn_create_rsp() local
1531 conn_id = *p++; in nfc_ncif_proc_conn_create_rsp()
1532 if (conn_id > NFC_MAX_CONN_ID) { in nfc_ncif_proc_conn_create_rsp()
1534 conn_id = NFC_ILLEGAL_CONN_ID; in nfc_ncif_proc_conn_create_rsp()
1543 nfc_set_conn_id(p_cb, conn_id); in nfc_ncif_proc_conn_create_rsp()
[all …]
Dnfc_main.cc765 nfc_cb.conn_cb[xx].conn_id = NFC_ILLEGAL_CONN_ID; in NFC_Init()
1053 tNFC_STATUS NFC_ConnClose(uint8_t conn_id) { in NFC_ConnClose() argument
1054 tNFC_CONN_CB* p_cb = nfc_find_conn_cb_by_conn_id(conn_id); in NFC_ConnClose()
1058 status = nci_snd_core_conn_close(conn_id); in NFC_ConnClose()
1120 tNFC_STATUS NFC_SendData(uint8_t conn_id, NFC_HDR* p_data) { in NFC_SendData() argument
1122 tNFC_CONN_CB* p_cb = nfc_find_conn_cb_by_conn_id(conn_id); in NFC_SendData()
1146 tNFC_STATUS NFC_FlushData(uint8_t conn_id) { in NFC_FlushData() argument
1148 tNFC_CONN_CB* p_cb = nfc_find_conn_cb_by_conn_id(conn_id); in NFC_FlushData()
/system/nfc/src/rust/nci/
Dnci.rs159 conn_id: u8, in open()
172 self.conns.write().await.insert(conn_id, Mutex::new(conn_params)).is_none(), in open()
174 conn_id in open()
178 pub async fn set_static_callback(&mut self, conn_id: u8, cb: Option<fn(u8, u16, &[u8])>) { in set_static_callback()
179 if conn_id < 2 && cb.is_some() { in set_static_callback()
181 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in set_static_callback()
188 pub async fn close(&mut self, conn_id: u8) -> Option<fn(u8, u16, &[u8])> { in close()
189 if let Some(conn_params) = self.conns.write().await.remove(&conn_id) { in close()
196 pub async fn add_credits(&self, conn_id: u8, ncreds: u8) { in add_credits()
197 if let Some(conn_params) = self.conns.read().await.get(&conn_id) { in add_credits()
[all …]
Dapi.rs358 pub async fn nfc_conn_close(&mut self, conn_id: u8) -> Result<u8> { in nfc_conn_close()
361 if let Some(cb) = conn.close(conn_id).await { in nfc_conn_close()
364 .send(ConnCloseCommandBuilder { gid: 0, pbf, conn_id }.build().into()) in nfc_conn_close()
369 cb(conn_id, 1, &conn_close_evt[..]); in nfc_conn_close()
455 pub async fn nfc_send_data(&mut self, conn_id: u8, data: &[u8]) -> Result<u8> { in nfc_send_data()
459 conn.send_packet(conn_id, pkt).await; in nfc_send_data()
484 pub async fn nfc_flush_data(&mut self, conn_id: u8) -> Result<u8> { in nfc_flush_data()
486 if conn.flush_data(conn_id).await { in nfc_flush_data()
/system/nfc/src/fuzzers/nci/
Dnci.cc22 static void nfc_rf_cback(uint8_t conn_id, tNFC_CONN_EVT event, in nfc_rf_cback() argument
24 FUZZLOG(MODULE_NAME ": rf_cback, conn_id=%d, event=0x%02x", conn_id, event); in nfc_rf_cback()
34 static void nfc_hci_cback(uint8_t conn_id, tNFC_CONN_EVT event, in nfc_hci_cback() argument
36 FUZZLOG(MODULE_NAME ": hci_cback, conn_id=%d, event=0x%02x", conn_id, event); in nfc_hci_cback()
/system/nfc/src/nfc/include/
Dnfc_int.h117 uint8_t conn_id; /* the connection id assigned by NFCC for this conn */ member
151 uint8_t conn_id[NFC_MAX_CONN_ID + 1]; /* index: conn_id; conn_id[]: index(1 member
238 extern tNFC_CONN_CB* nfc_find_conn_cb_by_conn_id(uint8_t conn_id);
240 extern void nfc_set_conn_id(tNFC_CONN_CB* p_cb, uint8_t conn_id);
258 extern void nfc_ncif_error_status(uint8_t conn_id, uint8_t status);
270 extern void nfc_ncif_report_conn_close_evt(uint8_t conn_id, tNFC_STATUS status);
Dnci_hmsgs.h50 uint8_t nci_snd_core_conn_close(uint8_t conn_id);
Dnfc_api.h802 typedef void(tNFC_CONN_CBACK)(uint8_t conn_id, tNFC_CONN_EVT event,
1055 extern tNFC_STATUS NFC_ConnClose(uint8_t conn_id);
1103 extern tNFC_STATUS NFC_SendData(uint8_t conn_id, NFC_HDR* p_data);
1117 extern tNFC_STATUS NFC_FlushData(uint8_t conn_id);
/system/nfc/src/fuzzers/ce/
Dstubs.cc30 tNFC_STATUS NFC_SendData(uint8_t conn_id, NFC_HDR* p_data) { in NFC_SendData() argument
34 FUZZLOG("conn_id=%d, data=%s", conn_id, BytesToHex(p, len).c_str()); in NFC_SendData()
/system/nfc/src/fuzzers/rw/
Dstubs.cc27 tNFC_STATUS NFC_SendData(uint8_t conn_id, NFC_HDR* p_data) { in NFC_SendData() argument
31 FUZZLOG("conn_id=%d, data=%s", conn_id, BytesToHex(p, len).c_str()); in NFC_SendData()
/system/nfc/src/nfa/hci/
Dnfa_hci_main.cc62 static void nfa_hci_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event,
96 nfa_hci_cb.conn_id = 0; in nfa_hci_ee_info_cback()
439 nfa_hci_cb.conn_id = 0; in nfa_hci_proc_nfcc_power_mode()
449 nfa_hci_cb.conn_id = 0; in nfa_hci_proc_nfcc_power_mode()
587 (nfa_hci_cb.conn_id == 0)) { in nfa_hci_startup()
661 if (nfa_hci_cb.conn_id) { in nfa_hci_sys_disable()
666 NFC_ConnClose(nfa_hci_cb.conn_id); in nfa_hci_sys_disable()
670 nfa_hci_cb.conn_id = 0; in nfa_hci_sys_disable()
687 static void nfa_hci_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in nfa_hci_conn_cback() argument
699 nfa_hci_cb.conn_id = conn_id; in nfa_hci_conn_cback()
[all …]
/system/nfc/src/nfa/ee/
Dnfa_ee_main.cc432 tNFA_EE_ECB* nfa_ee_find_ecb_by_conn_id(uint8_t conn_id) { in nfa_ee_find_ecb_by_conn_id() argument
439 if (conn_id == p_cb->conn_id) { in nfa_ee_find_ecb_by_conn_id()
485 msg.conn.conn_id = p_cb->conn_id; in nfa_ee_sys_disable()
Dnfa_ee_act.cc615 static void nfa_ee_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in nfa_ee_conn_cback() argument
620 conn_id, event); in nfa_ee_conn_cback()
627 cbk.conn_id = conn_id; in nfa_ee_conn_cback()
998 NFC_ConnClose(p_cb->conn_id); in nfa_ee_api_mode_set()
1687 NFC_SendData(p_cb->conn_id, p_pkt); in nfa_ee_api_send_data()
1717 NFC_ConnClose(p_cb->conn_id); in nfa_ee_api_disconnect()
2390 p_cb = nfa_ee_find_ecb_by_conn_id(p_cbk->conn_id); in nfa_ee_nci_conn()
2400 p_cb->conn_id = p_cbk->conn_id; in nfa_ee_nci_conn()
2419 p_cb->conn_id = 0; in nfa_ee_nci_conn()
/system/nfc/src/nfc/tags/
Drw_t2t.cc42 static void rw_t2t_proc_data(uint8_t conn_id, tNFC_DATA_CEVT* p_data);
61 static void rw_t2t_proc_data(uint8_t conn_id, tNFC_DATA_CEVT* p_data) { in rw_t2t_proc_data() argument
117 p_t2t->state, conn_id, p_pkt->len, *p); in rw_t2t_proc_data()
236 void rw_t2t_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in rw_t2t_conn_cback() argument
241 LOG(VERBOSE) << StringPrintf("rw_t2t_conn_cback: conn_id=%i, evt=%i", conn_id, in rw_t2t_conn_cback()
244 if (conn_id != NFC_RF_CONN_ID) { in rw_t2t_conn_cback()
280 rw_t2t_proc_data(conn_id, &(p_data->data)); in rw_t2t_conn_cback()
Drw_t1t.cc44 static void rw_t1t_data_cback(uint8_t conn_id, tNFC_CONN_EVT event,
60 static void rw_t1t_data_cback(__attribute__((unused)) uint8_t conn_id, in rw_t1t_data_cback() argument
220 void rw_t1t_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in rw_t1t_conn_cback() argument
224 LOG(VERBOSE) << StringPrintf("rw_t1t_conn_cback: conn_id=%i, evt=0x%x", conn_id, in rw_t1t_conn_cback()
227 if (conn_id != NFC_RF_CONN_ID) { in rw_t1t_conn_cback()
229 "rw_t1t_conn_cback - Not static connection id: =%i", conn_id); in rw_t1t_conn_cback()
260 rw_t1t_data_cback(conn_id, event, p_data); in rw_t1t_conn_cback()
Drw_mfc.cc95 static void rw_mfc_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event,
631 static void rw_mfc_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in rw_mfc_conn_cback() argument
643 LOG(VERBOSE) << StringPrintf("%s conn_id=%i, evt=0x%x", __func__, conn_id, in rw_mfc_conn_cback()
646 if (conn_id != NFC_RF_CONN_ID) { in rw_mfc_conn_cback()
648 conn_id); in rw_mfc_conn_cback()
Dce_t4t.cc543 static void ce_t4t_data_cback(uint8_t conn_id, tNFC_CONN_EVT event, in ce_t4t_data_cback() argument
565 LOG(VERBOSE) << StringPrintf("conn_id = 0x%02X", conn_id); in ce_t4t_data_cback()
Dce_t3t.cc797 void ce_t3t_conn_cback(uint8_t conn_id, tNFC_CONN_EVT event, in ce_t3t_conn_cback() argument
801 LOG(VERBOSE) << StringPrintf("ce_t3t_conn_cback: conn_id=%i, evt=%i", conn_id, in ce_t3t_conn_cback()
/system/nfc/src/
Dnci_packets.pdl102 conn_id : 4,
434 conn_id : 8,
438 conn_id : 8,
446 conn_id : 4,
462 conn_id : 8,
/system/nfc/tools/casimir/src/
Dcontroller.rs925 let conn_id = { in core_conn_create() localVariable
927 .find(|conn_id| self.state.logical_connections[*conn_id as usize].is_none()) in core_conn_create()
978 self.state.logical_connections[conn_id as usize] = Some(logical_connection); in core_conn_create()
980 Ok(conn_id) in core_conn_create()
984 Ok(conn_id) => nci::CoreConnCreateResponseBuilder { in core_conn_create()
988 conn_id: nci::ConnId::from_dynamic(conn_id), in core_conn_create()
994 conn_id: 0.try_into().unwrap(), in core_conn_create()
1005 let conn_id = match cmd.get_conn_id() { in core_conn_close() localVariable
1017 let status = if conn_id >= MAX_LOGICAL_CONNECTIONS in core_conn_close()
1018 || self.state.logical_connections[conn_id as usize].is_none() in core_conn_close()
[all …]
Dnci_packets.pdl156 conn_id : ConnId,
434 conn_id : ConnId,
439 conn_id : ConnId,
448 conn_id : ConnId,
/system/nfc/src/nfa/include/
Dnfa_ee_int.h181 uint8_t conn_id; /* connection id */ member
392 uint8_t conn_id; member
552 tNFA_EE_ECB* nfa_ee_find_ecb_by_conn_id(uint8_t conn_id);
/system/nfc/src/nfc/nci/
Dnci_hrcv.cc111 uint8_t conn_id; in nci_proc_core_ntf() local
140 conn_id = *(pp + 1); in nci_proc_core_ntf()
141 nfc_ncif_error_status(conn_id, *pp); in nci_proc_core_ntf()
Dnci_hmsgs.cc278 uint8_t nci_snd_core_conn_close(uint8_t conn_id) { in nci_snd_core_conn_close() argument
294 UINT8_TO_STREAM(pp, conn_id); in nci_snd_core_conn_close()

12