📄 mifare.h
字号:
/*****************************************************************************
mifare.h: Header file for NXP LPC23xx/24xx Family Microprocessors
******************************************************************************/
#ifndef __MIFARE_H
#define __MIFARE_H
/* this variable is used for retreval of card ID after a card is placed on the reader*/
extern unsigned char mif_ser_no[4];
extern unsigned char mif_seq_no;
unsigned char serial_rx_timeout(void);//SERIAL RECEVING OF DATA WITH SOME TIMEOUT
/*
FUNCTION : mif_send_block(parameter1,parameter2);
used to send a single set of command for the mifare reader
parameter 1 -> data send as command
parameter 2 -> data received as buffer
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_send_block(unsigned char *, unsigned char *);
/*
FUNCTION : mif_request();
used to send a request command for the mifare reader
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_request(void);
/*
FUNCTION : mif_anti_col();
used to check for anticollision for more than one card placed on the mifare reader
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_anti_col(void);
/*
FUNCTION : mif_select();
used to check for select card placed on the mifare reader
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_select(void);
/*
FUNCTION : mif_load_key(parameter 1,parameter 2,parameter 3);
used to load the key in to the mifare reader at runtime
parameter 1 : mode (type A or type B,etc)
parameter 2 : sector in which to load key
parameter 3 : key to be loaded
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_load_key(unsigned char , unsigned char , unsigned char *);
/*
FUNCTION : mif_read_card(parameter 1,parameter 2);
used to read the data of a single block at runtime from the card.
parameter 1 : output buffer
parameter 2 : sector to read data from
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_write_card(unsigned char *, unsigned char );
/*
FUNCTION : mif_read_card(parameter 1,parameter 2);
used to read the data of a single block at runtime from the card.
parameter 1 : output buffer
parameter 2 : sector to read data from
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_read_card(unsigned char *, unsigned char );
/*
FUNCTION : mif_halt();
used to halt the operations of mifare card reader
returns 1 for successful transaction
else return 0 for failure
*/
unsigned char mif_halt(void);
void rfid_init(void);
#endif /* end __MIFARE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -