File syn_rfid.h¶
FileList > drivers > syn_rfid.h
Go to the source code of this file
Generic RFID & NFC Card Reader Driver (MFRC522 13.56MHz, PN532, RDM6300 125kHz).
#include "../common/syn_defs.h"#include "../port/syn_port_gpio.h"#include <stdbool.h>#include <stddef.h>#include <stdint.h>
Classes¶
| Type | Name |
|---|---|
| struct | SYN_RFID Generic RFID Instance Context. |
Public Types¶
| Type | Name |
|---|---|
| enum | SYN_RFIDType RFID Reader Type. |
Public Functions¶
| Type | Name |
|---|---|
| void | syn_rfid_clear_card (SYN_RFID * rfid) Clear card presence state (card removed). |
| void | syn_rfid_feed_card (SYN_RFID * rfid, const uint8_t * uid, uint8_t len) Feed raw UID scan bytes. |
| const uint8_t * | syn_rfid_get_uid (const SYN_RFID * rfid, uint8_t * len) Get last scanned UID byte array. |
| SYN_Status | syn_rfid_init (SYN_RFID * rfid, SYN_GPIO_Pin ss_pin, SYN_GPIO_Pin rst_pin, SYN_RFIDType type) Initialize RFID Reader context. |
| bool | syn_rfid_is_card_present (const SYN_RFID * rfid) Check if a card is present. |
Public Types Documentation¶
enum SYN_RFIDType¶
RFID Reader Type.
Public Functions Documentation¶
function syn_rfid_clear_card¶
Clear card presence state (card removed).
Parameters:
rfidRFID context.
function syn_rfid_feed_card¶
Feed raw UID scan bytes.
Parameters:
rfidRFID context.uidUID byte buffer.lenUID byte count (4, 7, or 10).
function syn_rfid_get_uid¶
Get last scanned UID byte array.
Parameters:
rfidRFID context.lenPointer to receive UID length.
Returns:
Pointer to UID bytes (or NULL).
function syn_rfid_init¶
Initialize RFID Reader context.
SYN_Status syn_rfid_init (
SYN_RFID * rfid,
SYN_GPIO_Pin ss_pin,
SYN_GPIO_Pin rst_pin,
SYN_RFIDType type
)
Parameters:
rfidRFID context.ss_pinSPI SS / I2C SDA pin.rst_pinReset GPIO pin.typeRFID IC type (MFRC522, PN532, RDM6300).
Returns:
SYN_OK on success.
function syn_rfid_is_card_present¶
Check if a card is present.
Parameters:
rfidRFID context.
Returns:
True if card present.
The documentation for this class was generated from the following file src/syntropic/drivers/syn_rfid.h