Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_tag_nfc

Driver for BigClown NFC Tag. More...

Data Structures

struct  bc_tag_nfc_t
 Instance. More...
 
struct  bc_tag_nfc_ndef_t
 NDEF Instance. More...
 

Macros

#define BC_TAG_NFC_I2C_ADDRESS_DEFAULT   0x08
 Default I2C address.
 
#define BC_TAG_NFC_BUFFER_SIZE   864
 

Functions

bool bc_tag_nfc_init (bc_tag_nfc_t *self, bc_i2c_channel_t i2c_channel, uint8_t i2c_address)
 Initialize NFC Tag. More...
 
bool bc_tag_nfc_memory_read (bc_tag_nfc_t *self, void *buffer, size_t length)
 Read from memory. More...
 
bool bc_tag_nfc_memory_write (bc_tag_nfc_t *self, void *buffer, size_t length)
 Write to memory. More...
 
bool bc_tag_nfc_memory_write_ndef (bc_tag_nfc_t *self, bc_tag_nfc_ndef_t *ndef)
 Write to memory. More...
 
void bc_tag_nfc_ndef_init (bc_tag_nfc_ndef_t *self)
 Initialize NDEF. More...
 
bool bc_tag_nfc_ndef_add_text (bc_tag_nfc_ndef_t *self, const char *text, const char *encoding)
 Add ndef text record. More...
 
bool bc_tag_nfc_ndef_add_uri (bc_tag_nfc_ndef_t *self, const char *uri)
 Add ndef uri record. More...
 

Detailed Description

Driver for BigClown NFC Tag.

Function Documentation

bool bc_tag_nfc_init ( bc_tag_nfc_t self,
bc_i2c_channel_t  i2c_channel,
uint8_t  i2c_address 
)

Initialize NFC Tag.

Parameters
[in]selfInstance
[in]i2c_channelI2C channel
[in]i2c_addressI2C device address

Definition at line 10 of file bc_tag_nfc.c.

Here is the call graph for this function:

bool bc_tag_nfc_memory_read ( bc_tag_nfc_t self,
void *  buffer,
size_t  length 
)

Read from memory.

Parameters
[in]selfInstance
[out]bufferPointer to destination buffer
[in]lengthNumber of bytes to be read, must by modulo 16, max 880
Returns
true On success
false On failure

Definition at line 66 of file bc_tag_nfc.c.

Here is the call graph for this function:

bool bc_tag_nfc_memory_write ( bc_tag_nfc_t self,
void *  buffer,
size_t  length 
)

Write to memory.

Parameters
[in]selfInstance
[in]bufferPointer to source buffer
[in]lengthNumber of bytes to be written, must by modulo 16, max 880
Returns
true On success
false On failure

Definition at line 102 of file bc_tag_nfc.c.

Referenced by bc_tag_nfc_memory_write_ndef().

Here is the call graph for this function:

Here is the caller graph for this function:

bool bc_tag_nfc_memory_write_ndef ( bc_tag_nfc_t self,
bc_tag_nfc_ndef_t ndef 
)

Write to memory.

Parameters
[in]selfInstance
[in]ndefInstance
Returns
true On success
false On failure

Definition at line 144 of file bc_tag_nfc.c.

Here is the call graph for this function:

bool bc_tag_nfc_ndef_add_text ( bc_tag_nfc_ndef_t self,
const char *  text,
const char *  encoding 
)

Add ndef text record.

Parameters
[in]selfInstance
[in]*textString to be added
[in]*encodingEncoding for example "en"

Definition at line 171 of file bc_tag_nfc.c.

bool bc_tag_nfc_ndef_add_uri ( bc_tag_nfc_ndef_t self,
const char *  uri 
)

Add ndef uri record.

Parameters
[in]selfInstance
[in]*uriURI

Definition at line 199 of file bc_tag_nfc.c.

void bc_tag_nfc_ndef_init ( bc_tag_nfc_ndef_t self)

Initialize NDEF.

Parameters
[in]selfInstance

Definition at line 156 of file bc_tag_nfc.c.