Chameleon-Mini
Configuration.h
Go to the documentation of this file.
1 /*
2  * Standards.h
3  *
4  * Created on: 15.02.2013
5  * Author: skuser
6  */
8 #ifndef STANDARDS_H_
9 #define STANDARDS_H_
10 
11 #include <stdint.h>
12 #include <stdbool.h>
13 
14 #include "Map.h"
15 
16 #define CONFIGURATION_NAME_LENGTH_MAX 32
17 #define CONFIGURATION_UID_SIZE_MAX 16
18 
19 typedef uint8_t ConfigurationUidType[CONFIGURATION_UID_SIZE_MAX];
20 
21 typedef enum {
22  /* This HAS to be the first element */
23  CONFIG_NONE = 0,
24 
25 #ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
26  CONFIG_MF_ULTRALIGHT,
27  CONFIG_MF_ULTRALIGHT_C,
28  CONFIG_MF_ULTRALIGHT_EV1_80B,
29  CONFIG_MF_ULTRALIGHT_EV1_164B,
30 #endif
31 #ifdef CONFIG_MF_CLASSIC_MINI_4B_SUPPORT
32  CONFIG_MF_CLASSIC_MINI_4B,
33 #endif
34 #ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
35  CONFIG_MF_CLASSIC_1K,
36 #endif
37 #ifdef CONFIG_MF_CLASSIC_1K_7B_SUPPORT
38  CONFIG_MF_CLASSIC_1K_7B,
39 #endif
40 #ifdef CONFIG_MF_CLASSIC_4K_SUPPORT
41  CONFIG_MF_CLASSIC_4K,
42 #endif
43 #ifdef CONFIG_MF_CLASSIC_4K_7B_SUPPORT
44  CONFIG_MF_CLASSIC_4K_7B,
45 #endif
46 #ifdef CONFIG_ISO14443A_SNIFF_SUPPORT
47  CONFIG_ISO14443A_SNIFF,
48 #endif
49 #ifdef CONFIG_ISO14443A_READER_SUPPORT
50  CONFIG_ISO14443A_READER,
51 #endif
52 #ifdef CONFIG_NTAG215_SUPPORT
53  CONFIG_NTAG215,
54 #endif
55 #ifdef CONFIG_VICINITY_SUPPORT
56  CONFIG_VICINITY,
57 #endif
58 #ifdef CONFIG_ISO15693_SNIFF_SUPPORT
59  CONFIG_ISO15693_SNIFF,
60 #endif
61 #ifdef CONFIG_SL2S2002_SUPPORT
62  CONFIG_SL2S2002,
63 #endif
64 #ifdef CONFIG_TITAGITSTANDARD_SUPPORT
65  CONFIG_TITAGITSTANDARD,
66 #endif
67 #ifdef CONFIG_TITAGITPLUS_SUPPORT
68  CONFIG_TITAGITPLUS,
69 #endif
70 #ifdef CONFIG_EM4233_SUPPORT
71  CONFIG_EM4233,
72 #endif
73 #ifdef CONFIG_MF_DESFIRE_SUPPORT
74  CONFIG_MF_DESFIRE,
75 #endif
76  /* This HAS to be the last element */
77  CONFIG_COUNT
78 } ConfigurationEnum;
79 
81 #define TAG_FAMILY_NONE 0
82 #define TAG_FAMILY_ISO14443A 1
83 #define TAG_FAMILY_ISO14443B 2
84 #define TAG_FAMILY_ISO15693 5
85 
86 
88 typedef struct {
96  void (*CodecInitFunc)(void);
98  void (*CodecDeInitFunc)(void);
102  void (*CodecTaskFunc)(void);
114  void (*ApplicationInitFunc)(void);
116  void (*ApplicationResetFunc)(void);
118  void (*ApplicationTaskFunc)(void);
120  void (*ApplicationTickFunc)(void);
132  uint16_t (*ApplicationProcessFunc)(uint8_t *ByteBuffer, uint16_t BitCount);
137  void (*ApplicationGetUidFunc)(ConfigurationUidType Uid);
142  void (*ApplicationSetUidFunc)(ConfigurationUidType Uid);
153  uint16_t MemorySize;
159  uint8_t UidSize;
163  bool ReadOnly;
167  uint8_t TagFamily;
168 
170 
171 extern ConfigurationType ActiveConfiguration;
172 
173 void ConfigurationInit(void);
174 void ConfigurationSetById(ConfigurationEnum Configuration);
175 MapIdType ConfigurationCheckByName(const char *Configuration);
176 void ConfigurationGetByName(char *Configuration, uint16_t BufferSize);
177 bool ConfigurationSetByName(const char *Configuration);
178 void ConfigurationGetList(char *ConfigurationList, uint16_t BufferSize);
179 
180 #endif /* STANDARDS_H_ */
uint8_t TagFamily
Definition: Configuration.h:167
uint16_t MemorySize
Definition: Configuration.h:153
Definition: Configuration.h:88
bool ReadOnly
Definition: Configuration.h:163
uint8_t UidSize
Definition: Configuration.h:159