![]() |
STM8L libraries for CR95HF 1.0
|
Functions | |
u8 | CR95HF_IDN (CR95HF_ResponseReceiving *IDN_Response) |
This function sends an IDN command. | |
u8 | CR95HF_ProtocolSelect (const u8 Protocol, const u8 ParametersLength, const u8 *Parameters, CR95HF_Protocol_Config *Protocol_Settings) |
This function sends a protocol select command. | |
u8 | CR95HF_SendRecv (CR95HF_ResponseReceiving *SendRecv_Response, CR95HF_CommandSending *SendRecv_Command) |
this function sends an Send Receive command allowing user to perform communication with tag protocol must be selected before calling this function | |
u8 | CR95HF_Idle (const u8 WakeUpFlags, const u8 EnterCtrlL, const u8 EnterCtrlH, const u8 WUCtrlL, const u8 WUCtrlH, const u8 LeaveCtrlL, const u8 LeaveCtrlH, const u8 WUPeriod, const u8 OscStart, const u8 DacStart, const u8 DacDataL, const u8 DacDataH, const u8 SwingsCnt, const u8 MaxSleep, CR95HF_Idle_Config *Idle_Config) |
This function sends an idle command using the parameters provided. | |
u8 | CR95HF_Rd_Wake_up_Reg (CR95HF_ResponseReceiving *Response, CR95HF_Idle_Config *Idle_Config) |
This function reads the wake up register of the CR95HF to determine what caused the awakening of the CR95HF after an Idle command. | |
u8 | CR95HF_Rd_Analog_Register_Config_B (CR95HF_ResponseReceiving *Response) |
This function reads the RCB register of the CR95HF to check the analog configuration Register containing the modulation depth and reader chain gain. Note that a CR95HF_Set_Analog_Register_Config_B_Index command must be issued before reading the register. | |
u8 | CR95HF_Set_Analog_Register_Config_B_Index (void) |
This command is used to set the address index before reading the analog configuration register. | |
u8 | CR95HF_Wr_Analog_Register_Config_B_Reg (u8 Analog_Configuration_Register) |
This command is used to overwrite the Analog Configuration Register. | |
u8 | CR95HF_Baud_Rate (const u8 New_Baud_Rate) |
This function changes the baud rate communication between MCU and CR95HF. If the command fails last. | |
u8 | CR95HF_Echo (void) |
this function sends an ECHO command |
u8 CR95HF_Baud_Rate | ( | const u8 | New_Baud_Rate | ) |
This function changes the baud rate communication between MCU and CR95HF. If the command fails last.
New_Baud_Rate | : baud rate value computed as described in the datasheet : 117-> default value |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE,: | unsuccessful command, UART communication may be lost. |
u8 CR95HF_Echo | ( | void | ) |
this function sends an ECHO command
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE | : the command failed |
u8 CR95HF_Idle | ( | const u8 | WakeUpFlags, |
const u8 | EnterCtrlL, | ||
const u8 | EnterCtrlH, | ||
const u8 | WUCtrlL, | ||
const u8 | WUCtrlH, | ||
const u8 | LeaveCtrlL, | ||
const u8 | LeaveCtrlH, | ||
const u8 | WUPeriod, | ||
const u8 | OscStart, | ||
const u8 | DacStart, | ||
const u8 | DacDataL, | ||
const u8 | DacDataH, | ||
const u8 | SwingsCnt, | ||
const u8 | MaxSleep, | ||
CR95HF_Idle_Config * | Idle_Config | ||
) |
This function sends an idle command using the parameters provided.
WakeUpFlags | : Specifies wake up condition |
EnterCtrlL | : first byte of setting to enter to Idle mode |
EnterCtrlH | : second byte of setting to enter to Idle mode |
WUCtrlL | : first byte of setting to wake-up from Idle mode |
WUCtrlH | : second byte of setting to wake-up from Idle mode |
LeaveCtrlL | : first byte of setting to leave Idle mode |
LeaveCtrlH | : second byte of setting to leave Idle mode |
WUPeriod | : Period of time between two tags detection |
OscStart | : Waiting time to stabilize HFO |
DacStart | : Waiting time to stabilize DAC |
DacDataL | : lower compare value for tag detection |
DacDataH | : higher compare value for tag detection |
SwingsCnt | : Number of HF swings during tag detection |
MaxSleep | : maximum number of tag detection trials before timeout |
Idle_Config | : pointer on the structure containg the data about some idle parameters to update. |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE | : unsuccessful command,Response contains the right error code |
u8 CR95HF_IDN | ( | CR95HF_ResponseReceiving * | IDN_Response | ) |
This function sends an IDN command.
IDN_Response,: | pointer on the CR95HF response structure to fill in |
CR95HF_SUCCESS_CODE | : the command is successful |
CR95HF_ERROR_CODE | : the command failed |
u8 CR95HF_ProtocolSelect | ( | const u8 | Protocol, |
const u8 | ParametersLength, | ||
const u8 * | Parameters, | ||
CR95HF_Protocol_Config * | Protocol_Settings | ||
) |
This function sends a protocol select command.
Protocol | : protocol selected |
ParametersLength | : Length of eventual parameters attached |
Parameters | : Eventual parameters to be attached for different protocols |
Protocol_Settings | : structure to update at the end of the command containing last protocol selected and parameters |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_INVALID_PROTOCOL | : The protocol selected is wrong |
CR95HF_ERROR_INVALID_CMD_LENGTH | : The command length is invalid |
CR95HF_ERROR_CODE,: | unsuccessful command |
u8 CR95HF_Rd_Analog_Register_Config_B | ( | CR95HF_ResponseReceiving * | Response | ) |
This function reads the RCB register of the CR95HF to check the analog configuration Register containing the modulation depth and reader chain gain. Note that a CR95HF_Set_Analog_Register_Config_B_Index command must be issued before reading the register.
Response | : pointer on the response |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE,: | The command failed |
u8 CR95HF_Rd_Wake_up_Reg | ( | CR95HF_ResponseReceiving * | Response, |
CR95HF_Idle_Config * | Idle_Config | ||
) |
This function reads the wake up register of the CR95HF to determine what caused the awakening of the CR95HF after an Idle command.
Response | : pointer on the response |
Idle_Config | : pointer on the structure to update |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE,: | The command failed |
u8 CR95HF_SendRecv | ( | CR95HF_ResponseReceiving * | SendRecv_Response, |
CR95HF_CommandSending * | SendRecv_Command | ||
) |
this function sends an Send Receive command allowing user to perform communication with tag protocol must be selected before calling this function
SendRecv_Command | : the command to send |
SendRecv_Response | : pointer on the response |
CR95HF_SUCCESS_CODE | : The command is successful |
CR95HF_ERROR_CODE,: | unsuccessful command,Response contains the right error code |
u8 CR95HF_Set_Analog_Register_Config_B_Index | ( | void | ) |
This command is used to set the address index before reading the analog configuration register.
CR95HF_SUCCESS_CODE | : command succeed |
CR95HF_ERROR_CODE | : command failed |
u8 CR95HF_Wr_Analog_Register_Config_B_Reg | ( | u8 | Analog_Configuration_Register | ) |
This command is used to overwrite the Analog Configuration Register.
Analog_Configuration_Register | : value of the Analog Configuration Register to overwrite |
CR95HF_SUCCESS_CODE | : command succeed |
CR95HF_ERROR_INVALID_CMD_LENGTH | : command failed, invalid length |