app.h
Go to the documentation of this file.
1 
23 #ifndef _APP_H_
24 #define _APP_H_ 1
25 
26 #define VERSION 0x05
27 
28 #include <pic.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <math.h>
33 #include "pgrl.h"
34 #include "sci.h"
35 #include "delay.h"
36 #include "onewire.h"
37 #include "spi.h"
38 #include "at45xx.h"
39 #include "time.h"
40 #include "fs.h"
41 
45 //#define FCS0 RC2 ///< OUTPUT
46 
50 #define LB1 RB1
51 #define LB2 RB2
52 
53 
56 #define TOUCH RB0
57 
58 
61 //#define VSENS RB4 ///< I
62 #define TAMP RB5
63 #define WAKE RB4
64 
65 #define F_TAMP 0x01
66 #define F_VSENS 0x02
67 #define F_INTR 0x04
68 #define F_PCMD 0x08
69 #define F_WAITACK 0x10
70 #define F_DOWN 0x20
71 #define F_SPACE 0x40
72 #define F_NEXT 0x80
73 
74 
75 #define FN_TAMP 0
76 #define FN_VSENS 1
77 #define FN_INTR 2
78 #define FN_PCMD 3
79 #define FN_WAITACK 4
80 #define FN_DOWN 5
81 #define FN_SPACE 6
82 #define FN_NEXT 7
83 
84 #define GE_FILE 0
85 #define GE_LTA 1
86 #define GE_NOSPACE 2
87 
88 
91 #define CR_STX 0x02
92 #define CR_ETX 0x03
93 #define CR_ACK 0x06
94 #define CR_NAK 0x15
95 
96 #define FM_IDLE 0x00
97 #define FM_INIT 0x01
98 #define FM_END 0x02
99 
100 #define CR_START 'E'
101 #define CR_DEV '1'
102 
103 #define CR_INIT0 'A'
104 #define CR_INIT1 'B'
105 #define CR_ENABLE '4'
106 #define CR_DISABLE '5'
107 #define CR_NUM 'R'
108 #define CR_DOWN '0'
109 #define CR_DELETE '2'
110 #define CR_RESET 137
111 #define CR_DATETIME '1'
112 
116 #define CR_FORMAT 'F'
117 #define CR_INFO 'I'
118 #define CR_FF 'D'
119 
120 extern volatile BYTE gFlags;
121 
122 #endif // _APP_H_
123 /* ***************************************************************[ENDL]**** */
124 
Microchip PIC C Generic, General defines.
TIME CONVERSION.
1 wire protocol functions. Target: PIC16F876
File System.
Serial peripheral Interface. Target platform dependent.
Serial Communication Interface. Target: PIC16F876.
Serial Data Flash Driver.
unsigned char BYTE
Definition: pgrl.h:38
volatile BYTE gFlags
Definition: jadeku.c:81