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 #define CONFIGURATION_NAME_LENGTH_MAX 32
15 #define CONFIGURATION_UID_SIZE_MAX 16
16 
17 typedef uint8_t ConfigurationUidType[CONFIGURATION_UID_SIZE_MAX];
18 
19 typedef enum {
20  /* This HAS to be the first element */
21  CONFIG_NONE = 0,
22 
23 #ifdef CONFIG_MF_ULTRALIGHT_SUPPORT
24  CONFIG_MF_ULTRALIGHT,
25 #endif
26 #ifdef CONFIG_MF_CLASSIC_1K_SUPPORT
27  CONFIG_MF_CLASSIC_1K,
28 #endif
29 #ifdef CONFIG_MF_CLASSIC_1K_7B_SUPPORT
30  CONFIG_MF_CLASSIC_1K_7B,
31 #endif
32 #ifdef CONFIG_MF_CLASSIC_4K_SUPPORT
33  CONFIG_MF_CLASSIC_4K,
34 #endif
35 #ifdef CONFIG_MF_CLASSIC_4K_7B_SUPPORT
36  CONFIG_MF_CLASSIC_4K_7B,
37 #endif
38 #ifdef CONFIG_ISO14443A_SNIFF_SUPPORT
39  CONFIG_ISO14443A_SNIFF,
40 #endif
41 #ifdef CONFIG_ISO14443A_READER_SUPPORT
42  CONFIG_ISO14443A_READER,
43 #endif
44  /* This HAS to be the last element */
45  CONFIG_COUNT
46 } ConfigurationEnum;
47 
49 typedef struct {
57  void (*CodecInitFunc) (void);
59  void (*CodecDeInitFunc) (void);
63  void (*CodecTaskFunc) (void);
75  void (*ApplicationInitFunc) (void);
77  void (*ApplicationResetFunc) (void);
79  void (*ApplicationTaskFunc) (void);
81  void (*ApplicationTickFunc) (void);
93  uint16_t (*ApplicationProcessFunc) (uint8_t* ByteBuffer, uint16_t BitCount);
98  void (*ApplicationGetUidFunc) (ConfigurationUidType Uid);
103  void (*ApplicationSetUidFunc) (ConfigurationUidType Uid);
114  uint16_t MemorySize;
120  uint8_t UidSize;
124  bool ReadOnly;
125 
127 
128 extern ConfigurationType ActiveConfiguration;
129 
130 void ConfigurationInit(void);
131 void ConfigurationSetById(ConfigurationEnum Configuration);
132 void ConfigurationGetByName(char* Configuration, uint16_t BufferSize);
133 bool ConfigurationSetByName(const char* Configuration);
134 void ConfigurationGetList(char* ConfigurationList, uint16_t BufferSize);
135 
136 #endif /* STANDARDS_H_ */
uint16_t MemorySize
Definition: Configuration.h:114
Definition: Configuration.h:49
bool ReadOnly
Definition: Configuration.h:124
uint8_t UidSize
Definition: Configuration.h:120