Chameleon-Mini
Application.h
1 /*
2  * Application.h
3  *
4  * Created on: 18.02.2013
5  * Author: skuser
6  */
7 
8 #ifndef APPLICATION_H_
9 #define APPLICATION_H_
10 
11 #include "../Common.h"
12 #include "../Configuration.h"
13 #include "../Log.h"
14 
15 /* Applications */
16 #include "MifareUltralight.h"
17 #include "MifareClassic.h"
18 #include "Reader14443A.h"
19 #include "Vicinity.h"
20 #include "Sl2s2002.h"
21 #include "TITagitstandard.h"
22 #include "TITagitplus.h"
23 #include "Sniff14443A.h"
24 #include "NTAG215.h"
25 #include "EM4233.h"
26 #include "Sniff15693.h"
27 
28 /* Function wrappers */
29 INLINE void ApplicationInit(void) {
30  ActiveConfiguration.ApplicationInitFunc();
31 }
32 
33 INLINE void ApplicationTask(void) {
34  ActiveConfiguration.ApplicationTaskFunc();
35 }
36 
37 INLINE void ApplicationTick(void) {
38  ActiveConfiguration.ApplicationTickFunc();
39 }
40 
41 INLINE uint16_t ApplicationProcess(uint8_t *ByteBuffer, uint16_t ByteCount) {
42  return ActiveConfiguration.ApplicationProcessFunc(ByteBuffer, ByteCount);
43 }
44 
45 INLINE void ApplicationReset(void) {
46  ActiveConfiguration.ApplicationResetFunc();
47  //LogEntry(LOG_INFO_RESET_APP, NULL, 0);
48 }
49 
50 INLINE void ApplicationGetUid(ConfigurationUidType Uid) {
51  ActiveConfiguration.ApplicationGetUidFunc(Uid);
52 }
53 
54 INLINE void ApplicationSetUid(ConfigurationUidType Uid) {
55  ActiveConfiguration.ApplicationSetUidFunc(Uid);
56  LogEntry(LOG_INFO_UID_SET, Uid, ActiveConfiguration.UidSize);
57 }
58 
59 #endif /* APPLICATION_H_ */
void(* ApplicationSetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:142
uint16_t(* ApplicationProcessFunc)(uint8_t *ByteBuffer, uint16_t BitCount)
Definition: Configuration.h:132
void(* ApplicationResetFunc)(void)
Definition: Configuration.h:116
UID change.
Definition: Log.h:21
void(* ApplicationGetUidFunc)(ConfigurationUidType Uid)
Definition: Configuration.h:137
void(* ApplicationTickFunc)(void)
Definition: Configuration.h:120
void(* ApplicationTaskFunc)(void)
Definition: Configuration.h:118
void(* ApplicationInitFunc)(void)
Definition: Configuration.h:114
uint8_t UidSize
Definition: Configuration.h:159