magicrfid 2.0.0.0
|
API for configuring and manipulating Magic RFID Click driver. More...
Topics | |
Magic RFID Device Settings | |
Settings for registers of Magic RFID Click driver. | |
Magic RFID MikroBUS Map | |
MikroBUS pin mapping of Magic RFID Click driver. | |
Functions | |
void | magicrfid_cfg_setup (magicrfid_cfg_t *cfg) |
Magic RFID configuration object setup function. | |
err_t | magicrfid_init (magicrfid_t *ctx, magicrfid_cfg_t *cfg) |
Magic RFID initialization function. | |
void | magicrfid_default_cfg (magicrfid_t *ctx) |
Magic RFID default configuration function. | |
err_t | magicrfid_generic_write (magicrfid_t *ctx, uint8_t *data_buf, uint16_t len) |
Magic RFID data writing function. | |
err_t | magicrfid_generic_read (magicrfid_t *ctx, uint8_t *data_buf, uint16_t max_len) |
Magic RFID data reading function. | |
void | magicrfid_device_reset (magicrfid_t *ctx) |
Magic RFID device reset function. | |
void | magicrfid_send_command (magicrfid_t *ctx, magicrfid_command_t cmd) |
Magic RFID send command function. | |
err_t | magicrfid_get_response (magicrfid_t *ctx, magicrfid_response_t *rsp) |
Magic RFID get response function. | |
int8_t | magicrfid_parse_tag_rssi (magicrfid_response_t rsp) |
Parse Tag RSSI value. | |
uint32_t | magicrfid_parse_tag_freq (magicrfid_response_t rsp) |
Parse Tag Freq value. | |
void | magicrfid_parse_tag_epc (magicrfid_response_t rsp, magicrfid_epc_t *epc) |
Parse Tag EPC bytes. | |
void | magicrfid_set_tag_protocol (magicrfid_t *ctx, uint8_t protocol) |
Magic RFID set protocol function. | |
void | magicrfid_set_region (magicrfid_t *ctx, uint8_t region) |
Magic RFID set region function. | |
void | magicrfid_set_antenna_port (magicrfid_t *ctx) |
Magic RFID turn on antenna port function. | |
void | magicrfid_set_baud_rate (magicrfid_t *ctx, uint32_t baud_rate) |
Magic RFID set baud rate function. | |
void | magicrfid_set_read_power (magicrfid_t *ctx, uint16_t power_setting) |
Magic RFID set read function power. | |
void | magicrfid_set_write_power (magicrfid_t *ctx, uint16_t power_setting) |
Magic RFID set write function power. | |
void | magicrfid_set_reader_config (magicrfid_t *ctx, uint8_t option1, uint8_t option2) |
Magic RFID set reader configuration function. | |
void | magicrfid_start_reading (magicrfid_t *ctx) |
Magic RFID enable reading function. | |
void | magicrfid_clear_buffers (magicrfid_t *ctx) |
Magic RFID clear buffers function. | |
API for configuring and manipulating Magic RFID Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void magicrfid_cfg_setup | ( | magicrfid_cfg_t * | cfg | ) |
Magic RFID configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See magicrfid_cfg_t object definition for detailed explanation. |
void magicrfid_clear_buffers | ( | magicrfid_t * | ctx | ) |
Magic RFID clear buffers function.
This function clears UART ring buffers.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
void magicrfid_default_cfg | ( | magicrfid_t * | ctx | ) |
Magic RFID default configuration function.
This function executes a default configuration of Magic RFID click board.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
void magicrfid_device_reset | ( | magicrfid_t * | ctx | ) |
Magic RFID device reset function.
Device reset and wake up module.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
err_t magicrfid_generic_read | ( | magicrfid_t * | ctx, |
uint8_t * | data_buf, | ||
uint16_t | max_len ) |
Magic RFID data reading function.
This function reads a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[out] | data_buf | : Output read data. |
[in] | max_len | : Number of bytes to be read. |
>0
- Number of data bytes read, <=0
- Error/Empty Ring buffer. See #err_t definition for detailed explanation. err_t magicrfid_generic_write | ( | magicrfid_t * | ctx, |
uint8_t * | data_buf, | ||
uint16_t | len ) |
Magic RFID data writing function.
This function writes a desired number of data bytes by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | data_buf | : Data buffer for sending. |
[in] | len | : Number of bytes for sending. |
>=0
- Success, <0
- Error. See #err_t definition for detailed explanation. err_t magicrfid_get_response | ( | magicrfid_t * | ctx, |
magicrfid_response_t * | rsp ) |
Magic RFID get response function.
Get response function.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[out] | rsp | : Response object. See magicrfid_response_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t magicrfid_init | ( | magicrfid_t * | ctx, |
magicrfid_cfg_t * | cfg ) |
Magic RFID initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See magicrfid_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void magicrfid_parse_tag_epc | ( | magicrfid_response_t | rsp, |
magicrfid_epc_t * | epc ) |
Parse Tag EPC bytes.
This function parses EPC bytes of the tag.
[in] | rsp | : Response object. See magicrfid_response_t object definition for detailed explanation. |
[out] | epc | : EPC data object. See magicrfid_epc_t object definition for detailed explanation. |
uint32_t magicrfid_parse_tag_freq | ( | magicrfid_response_t | rsp | ) |
Parse Tag Freq value.
This function parses the frequency value the tag was detected at.
[in] | rsp | : Response object. See magicrfid_response_t object definition for detailed explanation. |
int8_t magicrfid_parse_tag_rssi | ( | magicrfid_response_t | rsp | ) |
Parse Tag RSSI value.
This function parses RSSI value of the tag.
[in] | rsp | : Response object. See magicrfid_response_t object definition for detailed explanation. |
void magicrfid_send_command | ( | magicrfid_t * | ctx, |
magicrfid_command_t | cmd ) |
Magic RFID send command function.
Send command function.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | cmd | : Command object. See magicrfid_command_t object definition for detailed explanation. |
void magicrfid_set_antenna_port | ( | magicrfid_t * | ctx | ) |
Magic RFID turn on antenna port function.
This function is used for setting up antenna port of Magic RFID Click Board by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
void magicrfid_set_baud_rate | ( | magicrfid_t * | ctx, |
uint32_t | baud_rate ) |
Magic RFID set baud rate function.
This function is used for setting up baud rate of Magic RFID Click Board by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | baud_rate | : Baud rate value. |
void magicrfid_set_read_power | ( | magicrfid_t * | ctx, |
uint16_t | power_setting ) |
Magic RFID set read function power.
This function is used for setting up read power of Magic RFID Click Board in dBm by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | power_setting | : Power setting value in dBm. |
void magicrfid_set_reader_config | ( | magicrfid_t * | ctx, |
uint8_t | option1, | ||
uint8_t | option2 ) |
Magic RFID set reader configuration function.
This function is used for sending optional parameters to Magic RFID Click BoardSends optional parameters by using the UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
void magicrfid_set_region | ( | magicrfid_t * | ctx, |
uint8_t | region ) |
Magic RFID set region function.
This function is used for setting up region of Magic RFID Click Board by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | region | : Selected region. |
void magicrfid_set_tag_protocol | ( | magicrfid_t * | ctx, |
uint8_t | protocol ) |
Magic RFID set protocol function.
This function is used for setting up protocol of Magic RFID Click Board by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | protocol | : Selected protocol. |
void magicrfid_set_write_power | ( | magicrfid_t * | ctx, |
uint16_t | power_setting ) |
Magic RFID set write function power.
This function is used for setting up write power of Magic RFID Click Board in dBm by using UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |
[in] | power_setting | : Power setting value in dBm. |
void magicrfid_start_reading | ( | magicrfid_t * | ctx | ) |
Magic RFID enable reading function.
This function is used for setting up Magic RFID Click Board in continuous reading mode by using the UART serial interface.
[in] | ctx | : Click context object. See magicrfid_t object definition for detailed explanation. |