YHY638F
13.56MHz RFID Reader/Writer
User Manual
Version 1.0
Page 21 of 28
Apr 2010
pLen: [OUT] length of response data
Return: return 0 if successful
6.3.3.3 INT WINAPI INT_RF_SR176_WRITEBLOCK
Function: SR176 Write
Prototype: int WINAPI int rf_sr176_writeblock (unsigned short icdev,
unsigned char block,
unsigned char *pData)
Parameter: icdev: [IN] Device ID
block: [IN] block address
pData: [IN] written data, 2 bytes
Return: return 0 if successful
6.3.3.4 INT WINAPI INT_RF_SR176_PROTECTBLOCK
Function: SR176 Lock
Prototype: int WINAPI int rf_sr176_protectblock (unsigned short icdev, unsigned char lockreg)
Parameter: icdev: [IN] Device ID
lockreg: [IN] LOCKREG
Return: return 0 if successful
Explanation:SR17 6has 16 blocks, every lockreg controls 2 blocks
lockreg BLOCK bit_setting
b7 14 & 15 0:Write Enable 1:Block set as ROM
b6 12 & 13 0:Write Enable 1:Block set as ROM
b5 10 & 11 0:Write Enable 1:Block set as ROM
b4 8 & 9 0:Write Enable 1:Block set as ROM
b3 6 & 7 0:Write Enable 1:Block set as ROM
b2 4 & 5 0:Write Enable 1:Block set as ROM
b1 2 & 3 0:Write Enable 1:Block set as ROM
b0 0 & 1 0:Write Enable 1:Block set as ROM
6.3.3.5 INT WINAPI INT_RF_SRIX4K_ GETUID
Function: SRIX4K Get UID
Prototype: int WINAPI int rf_srix4k_getuid ( unsigned short icdev,
unsigned char *pUid,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID
pUid: [OUT] response data from card, UID
pLen: [OUT] length of response data
Return: return 0 if successful
6.3.3.6 INT WINAPI INT_RF_SRIX4K_ READBLOCK
Function: SRIX4K Read
Prototype: int WINAPI int rf_srix4k_readblock (unsigned short icdev,
unsigned char block,
unsigned char *pData,
unsigned char *pLen)
Parameter: icdev: [IN] Device ID