STM8L libraries for CR95HF 1.0
Functions | Variables
ISO15693/Products/src/lrixk_command.c File Reference

This file contains all the functions in order to send commands to a contactless tag of the LRIXK family performing iso15693 standards. Note that command dealing with multiple blocks (write read get status) utilize internal eeprom of the MCU whereas other commands use flash program memory. More...

#include "lrixk_command.h"

Functions

u8 LRIXK_Inventory (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved)
 This function sends, through the CR95HF, to a contactless tag posssibly of the LRIXK family, an inventory command and fills the Tag structure if some contactless tag answers.
u8 LRIXK_Stay_Quiet (const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a stay quiet command to a unique contactless tag possibly belonging to the LRIXK family designated by its UID.
u8 LRIXK_Read_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Block_number)
 This function sends, through the CR95HF, a read single block command to the contactless tag possibly of the LRIXK family in the field or to an unique contactless tag designated by its UID.
u8 LRIXK_Write_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Block_number, const u8 *Data)
 This function sends, through the CR95HF, a write single block command to the contactless tag opssibly from the LRIXK family in the field or to an unique contactless tag designated by its UID.
u8 LRIXK_Lock_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Block_number)
 This function sends, through the CR95HF, a lock block command to the contactless tag in the field or to an unique contactless tag designated by its UID.
u8 LRIXK_Read_Multiple_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 First_Block_number, const u8 Number_of_Blocks)
 This function sends, through the CR95HF, a read multiple block command to the contactless tag possibly belonging to the LRIXK family in the field or to an unique contactless tag designated by its UID. Note that data received are stored into the internal EEPROM of the MCU.
u8 LRIXK_Select (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a select command to the unique contactless tag designated by its UID possibly belonging to the LRIXK family.
u8 LRIXK_Reset_to_Ready (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a reset to ready state command to a contactless tag possibly belong to the LRIXK family. This command could be used in two different case:
u8 LRIXK_Write_AFI (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Tag_AFI)
 This function sends, through the CR95HF, a write AFI command to the contacless tag in the field possibly belonging to the LRIXK family or to an unique contactless tag designated by its UID.
u8 LRIXK_Lock_AFI (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a Lock AFI command to the contacless tag in the field possibly from the LRIXK family or to an unique contactless tag designated by its UID.
u8 LRIXK_Write_DSFID (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Tag_DSFID)
 This function sends, through the CR95HF, a write DSFID command to the contacless tag in the field possibly belonging to the LRIXK family or to an unique contactless tag designated by its UID.
u8 LRIXK_Lock_DSFID (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a Lock DSFID command to the contacless tag in the field possibly from the LRIXK family or to an unique contactless tag designated by its UID.
u8 LRIXK_Get_System_Info (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, an get System Information command to the contacless tag ,possibly from the LRIXK family, in the field or to an unique contactless tag designated by its UID.
u8 LRIXK_Get_Multiple_Blocks_Security_Status (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 First_Block_number, const u8 Number_of_Blocks)
 This function sends, through the CR95HF, a get multiple blocks security status command to the contactless tag in the field,possibly from the LRIXK family, or to an unique contactless tag designated by its UID. note that data are stored into the eeprom.
u8 LRIXK_Kill (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 *Kill_Code)
 This function sends, through the CR95HF, a kill command to the unique contactless tag designated by its UID and belonging to the LRIXK family. On receiving the kill command the contactless tag compares the kill code added to command and if it matches with the kill code previously written into the code. The contactless answers to the command before being deactivated.
u8 LRIXK_Write_Kill (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 *Kill_Code)
 This function sends, through the CR95HF, a kill command to a LRIXK contactless tag in the field or designated by its UID . The kill code provided is transmitted to the contactless tag and will be required to deactivate the LRIXK product. Note that a Lock kill command is necessary after this command to protect the kill code.
u8 LRIXK_Lock_Kill (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID)
 This function sends, through the CR95HF, a lock kill command to a LRIXK contactless tag in the field or designated by its UID . The kill code written previously is locked by the LRIXK contactless tag and once done the kill code cannot be changed.
u8 LRIXK_Fast_Read_Single_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 Block_number)
 This function sends, through the CR95HF, a read single block command to the LIRXK contactless tag in the field or to an unique contactless tag designated by its UID. the particularity of this command is the datatrate used by the contactless tag to answer which is 53kbits/s.
u8 LRIXK_Fast_Inventory_Initiated (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, const u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved)
 This function sends, through the CR95HF, a fast inventory command to the LRIXK contactless tags in the field. The datarate of the response is multiplied by 2 (here 52kbits/s). Note that a fast initiate command should be issued before calling this function.
u8 LRIXK_Fast_Initiate (ISO15693_Tag *MyTag, const u8 Request_flags)
 This function sends, through the CR95HF, a fast initiate command to a LRIXK contactless tag in the field or designated by its UID . On receiving the fast initiate command the LRIXK contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID, with a datarate multiplied by two (here 52kbits/s). Note that the command should not be in adressed or selected mode, the flag is reset afther a power off.
u8 LRIXK_Fast_Read_Multiple_Block (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 *Tag_UID, const u8 First_Block_number, const u8 Number_of_Blocks)
 This function sends, through the CR95HF, a read multiple block command a fast read multiple blocks command to a LRIXK contactless tag in the field or designated by its UID . Note that data received are stored into the internal EEPROM of the MCU.
u8 LRIXK_Inventory_Initiated (ISO15693_Tag *MyTag, const u8 Request_flags, const u8 Tag_AFI, const u8 MaskLength, const u8 *Mask, u8 *Inventory_16_slots_Nb_UID_Retrieved)
 This function sends, through the CR95HF, an inventory initiated command to the LRIXK contactless tags in the field. On receiving the initiate command the LRIXK contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID. Note that a initiate command should be issued before calling this function.
u8 LRIXK_Initiate (ISO15693_Tag *MyTag, const u8 Request_flags)
 This function sends, through the CR95HF, an initiate command to a LRIXK contactless tag in the field or designated by its UID . On receiving the initiate command the LRIXK contactless tag set the internal initiate flag ( to send a inventory initited command) and returns its UID and its DSFID. Note that the command should not be in addressed or selected mode, the flag is reset afther a power off.
u8 LRIXK_Is_Request_Flags_ok (const u8 Request_flags, const u8 LRIXK_cmd_code)
 This function performs several checks to verify that the request flag is not wrong for the LRIXK family contactless tags.
u8 LRIXK_Is_Memory_programming_function (const u8 LRIXK_cmd_code)
 This function returns if the LRIXK contactless tag performs a memory programming by processing the command. ( write, lock). Note that this functions includes the LRIXK custom commands.
u8 LRIXK_Is_Fast_Datarate_ok (const u8 Request_flags, const CR95HF_Protocol_Config *Protocol_Settings)
 This function returns for fast commands if the datarate selected with the protocol select function is really 52kbits/s and if the requestflags is really in high datarate ( fast command multiplies the data rate per 2 (High datarate : 26kbits/s)
u8 LRIXK_Is_Fast_Command (const u8 LRIXK_cmd_code)
 This function returns if the command is a fast command.

Variables

CR95HF_Protocol_Config Protocol_Settings
CR95HF_CommandSending Cmd
CR95HF_ResponseReceiving Response

Detailed Description

This file contains all the functions in order to send commands to a contactless tag of the LRIXK family performing iso15693 standards. Note that command dealing with multiple blocks (write read get status) utilize internal eeprom of the MCU whereas other commands use flash program memory.

Author:
STMicroelectronics - MMY Application Team
Version:
V1.0
Date:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

logo.bmp

Variable Documentation

Common Stucture used to transmit data within commands

Protocol and parameters related used

Common Stucture used to receive data within commands

 All Data Structures Files Functions Variables Defines