nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
ch.h File Reference
#include <stdint.h>
#include <string.h>
#include <zephyr/types.h>
#include <nfc/ndef/record.h>
#include <nfc/ndef/msg.h>
#include <nfc/ndef/payload_type_common.h>

Go to the source code of this file.

Data Structures

struct  nfc_ndef_ch_hc_rec
 Handover Carrier record payload descriptor. More...
 
struct  nfc_ndef_ch_ac_rec_ref
 Carrier Data Reference and Auxiliary Data Reference descriptor. More...
 
struct  nfc_ndef_ch_ac_rec
 Alternative Carrier record payload descriptor. More...
 
struct  nfc_ndef_ch_cr_rec
 Collision Resolution record payload descriptor. More...
 
struct  nfc_ndef_ch_rec
 Handover Select record payload descriptor. More...
 

Macros

#define NFC_NDEF_CH_REC_TYPE_LENGTH   2
 Size of the type field of the Connection Handover records. Record types are defined in the file ch_rec.c.
 
#define NFC_NDEF_CH_AC_CPS_MASK   (NFC_AC_CPS_UNKNOWN)
 
#define NFC_NDEF_CH_RECORD_DESC_DEF(_name, _rec_type_field, _major_version, _minor_version, _max_records)
 Macro for creating and initializing an NFC NDEF record descriptor for the Connection Handover.
 
#define NFC_NDEF_CH_HS_RECORD_DESC_DEF(_name, _major_version, _minor_version, _max_records)
 Macro for creating and initializing an NFC NDEF record descriptor for a Handover Select record.
 
#define NFC_NDEF_CH_HR_RECORD_DESC_DEF(_name, _major_version, _minor_version, _max_records)
 Macro for creating and initializing an NFC NDEF record descriptor for a Handover Request record.
 
#define NFC_NDEF_CH_HM_RECORD_DESC_DEF(_name, _major_version, _minor_version, _max_records)
 Macro for creating and initializing an NFC NDEF record descriptor for a Handover Mediation record.
 
#define NFC_NDEF_CH_HI_RECORD_DESC_DEF(_name, _major_version, _minor_version, _max_records)
 Macro for creating and initializing an NFC NDEF record descriptor for a Handover Initiate record.
 
#define NFC_NDEF_CH_RECORD_DESC(_name)   NFC_NDEF_GENERIC_RECORD_DESC(_name)
 Macro for accessing the NFC NDEF Handover Select record descriptor instance that was created with NFC_NDEF_CH_HS_RECORD_DESC_DEF.
 
#define NFC_NDEF_CH_HC_RECORD_DESC_DEF(_name, _payload_id, _payload_id_length, _payload_desc)
 Macro for creating and initializing an NFC NDEF record descriptor for the Handover Carrier record.
 
#define NFC_NDEF_CH_HC_RECORD_DESC(_name)   NFC_NDEF_GENERIC_RECORD_DESC(_name)
 Macro for accessing the NFC NDEF Handover Carrier record descriptor instance that was created with NFC_NDEF_CH_HC_GENERIC_RECORD_DESC_DEF.
 
#define NFC_NDEF_CH_AC_RECORD_DESC_DEF(_name, _cps, _carr_data_ref_len, _carr_data_ref, _max_aux_data_ref_cnt)
 Macro for creating and initializing an NFC NDEF record descriptor for an Alternative Carrier record.
 
#define NFC_NDEF_CH_AC_RECORD_DESC(_name)   NFC_NDEF_GENERIC_RECORD_DESC(_name)
 Macro for accessing the NFC NDEF Alternative Carrier record descriptor instance that was created with NFC_NDEF_AC_RECORD_DESC_DEF.
 
#define NFC_NDEF_CH_CR_RECORD_DESC_DEF(_name, _random_number)
 Macro for creating and initializing an NFC NDEF record descriptor for a Collision Resolution record.
 
#define NFC_NDEF_CR_RECORD_DESC(_name)   NFC_NDEF_GENERIC_RECORD_DESC(_name)
 Macro for accessing the NFC NDEF Alternative Carrier record descriptor instance that was created with NFC_NDEF_CH_CR_RECORD_DESC_DEF.
 

Enumerations

enum  nfc_ndef_ch_ac_rec_cps { NFC_AC_CPS_INACTIVE = 0x00 , NFC_AC_CPS_ACTIVE = 0x01 , NFC_AC_CPS_ACTIVATING = 0x02 , NFC_AC_CPS_UNKNOWN = 0x03 }
 Carrier Power State. More...
 

Functions

int nfc_ndef_ch_rec_payload_encode (const struct nfc_ndef_ch_rec *ch_rec, uint8_t *buf, uint32_t *len)
 Constructor for an NFC Connection Handover generic record payload.
 
void nfc_ndef_ch_rec_local_record_clear (struct nfc_ndef_record_desc *ch_rec)
 Function for clearing local records in the NFC NDEF Connection Handover records.
 
int nfc_ndef_ch_rec_local_record_add (struct nfc_ndef_record_desc *ch_rec, const struct nfc_ndef_record_desc *local_rec)
 Function for adding a local record to an NFC NDEF Handover Select record.
 
int nfc_ndef_ch_hc_rec_payload_encode (const struct nfc_ndef_ch_hc_rec *hc_rec, uint8_t *buf, uint32_t *len)
 Constructor for an NFC Connection Handover Carrier Record payload.
 
int nfc_ndef_ch_ac_rec_payload_encode (const struct nfc_ndef_ch_ac_rec *nfc_rec_ac, uint8_t *buf, uint32_t *len)
 Constructor for an NFC NDEF Alternative Carrier record payload.
 
void nfc_ndef_ch_ac_rec_auxiliary_data_ref_clear (struct nfc_ndef_record_desc *ac_rec)
 Function for clearing an Auxiliary Data Reference in an NFC NDEF Alternative Carrier record.
 
int nfc_ndef_ch_ac_rec_auxiliary_data_ref_add (struct nfc_ndef_record_desc *ac_rec, const uint8_t *aux_data, uint8_t aux_length)
 Function for adding an Auxiliary Data Reference to an NFC NDEF Alternative Carrier record.
 
int nfc_ndef_ch_cr_rec_payload_encode (const struct nfc_ndef_ch_cr_rec *nfc_rec_cr, uint8_t *buf, uint32_t *len)
 Constructor for an NFC NDEF Collision Resolution record payload.