Lines Matching refs:pkt
28 int hal_nci_send(tNFC_NCI_PKT* pkt) { in hal_nci_send() argument
29 size_t len = (size_t)(pkt->len + NCI_HDR_SIZE); in hal_nci_send()
32 ret = __send_to_device((uint8_t*)pkt, len); in hal_nci_send()
39 util_nci_analyzer(pkt); in hal_nci_send()
128 tNFC_NCI_PKT* pkt = &msg->nci_packet; in nci_read_payload() local
131 ret = device_read(NCI_PAYLOAD(pkt), NCI_LEN(pkt)); in nci_read_payload()
132 if (ret != (int)NCI_LEN(pkt)) { in nci_read_payload()
150 bool nfc_hal_prehandler(tNFC_NCI_PKT* pkt) { in nfc_hal_prehandler() argument
151 if (NCI_MT(pkt) == NCI_MT_NTF) { in nfc_hal_prehandler()
152 if (NCI_GID(pkt) == NCI_GID_PROP) { in nfc_hal_prehandler()
154 if (NCI_OID(pkt) == NCI_PROP_AGAIN) { in nfc_hal_prehandler()
166 if (NCI_MT(pkt) == NCI_MT_CMD) { in nfc_hal_prehandler()
167 if (NCI_GID(pkt) == NCI_GID_PROP) { in nfc_hal_prehandler()
168 if (NCI_OID(pkt) == NCI_PROP_WR_RESET) { in nfc_hal_prehandler()
174 if (NCI_OID(pkt) == NCI_PROP_SET_SLEEP_TIME) { in nfc_hal_prehandler()
177 dummy_rsp.oid = NCI_OID(pkt); in nfc_hal_prehandler()
181 if (NCI_LEN(pkt) == 0) { in nfc_hal_prehandler()
184 uint32_t timeout = NCI_PAYLOAD(pkt)[0] * 1000; // sec in nfc_hal_prehandler()
187 if (NCI_LEN(pkt) > 1) in nfc_hal_prehandler()
188 timeout += NCI_PAYLOAD(pkt)[1] * 1000 * 60; // min in nfc_hal_prehandler()
190 if (NCI_LEN(pkt) > 2) option = NCI_PAYLOAD(pkt)[2]; in nfc_hal_prehandler()
202 if (NCI_MT(pkt) == NCI_MT_RSP) { in nfc_hal_prehandler()
203 if (NCI_GID(pkt) == NCI_GID_CORE) { in nfc_hal_prehandler()
204 if (NCI_OID(pkt) == NCI_CORE_RESET) { in nfc_hal_prehandler()
205 pkt->oct0 = NCI_MT_RSP | NCI_PBF_LAST | NCI_GID_PROP; in nfc_hal_prehandler()
206 pkt->oid = NCI_PROP_WR_RESET; in nfc_hal_prehandler()