-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathsmartcard.h
58 lines (44 loc) · 1.65 KB
/
smartcard.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* -----------------------------------------------------------------------------
* ----- SMARTCARD.H -----
* ----- EASYPAY -----
* -----------------------------------------------------------------------------
*
* File Description:
* This is the header file for smartcard.c, the library of functions for
* interfacing the PIC18F67K22 with Mifare SmartCards.
*
* Assumptions:
* None
*
* Compiler:
* HI-TECH C Compiler for PIC18 MCUs (http://www.htsoft.com/)
*
* Revision History:
* May 05, 2013 Nnoduka Eruchalu Initial Revision
* May 06, 2013 Nnoduka Eruchalu Updated to use mifare_tag_simple
* May 14, 2013 Nnoduka Eruchalu removed unused scanning functions
* changed CARD_USER->CARD_TAP
*/
#ifndef SMARTCARD_H
#define SMARTCARD_H
/* library include files */
#include <stdint.h>
/* local include files*/
#include "mifare.h"
/* SMARTCARD CONSTANTS */
/* none */
/* SMARTCARD CODES */
#define CARD_TAP 0 /* user's EasyCard */
#define CARD_TOPUP 1 /* EasyTopup Card */
#define CARD_INVALID 2 /* invalid Card tapped */
/* FUNCTION PROTOTYPES */
/* initializes the card and the CardScan variables */
extern void CardInit(void);
/* checks if a smartcard has been tapped */
extern uint8_t IsACard(void);
/* Gets a smartcard code from the tapped card */
extern uint8_t GetCard(void);
/* Get a pointer to PICC representation */
extern mifare_tag *GetCardTag(void);
#endif /* SMARTCARD_H */