forked from hoglet67/AtoMMC2Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
atmmc2.h
67 lines (43 loc) · 1.17 KB
/
atmmc2.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
59
60
61
62
63
64
65
66
67
#ifndef __MMC2_H
#define __MMC2_H
#include "platform.h"
#if (PLATFORM==PLATFORM_PIC)
#include <p18cxxx.h>
#elif (PLATFORM==PLATFORM_AVR)
#endif
#define VSN_MAJ 2
#define VSN_MIN 13
#define SECBUFFSIZE 512
#define GLOBUFFSIZE 256
#if defined(__18F4525) || (PLATFORM==PLATFORM_AVR)
#define INCLUDE_SDDOS
#endif
#define EE_SYSFLAGS 0xff
#define EE_PORTBVALU 0xfe
#define EE_PORTBTRIS 0xfe
extern unsigned char configByte;
extern unsigned char CardType;
extern unsigned char blVersion;
extern unsigned char portBVal;
extern unsigned char globalData[];
#if (PLATFORM!=PLATFORM_AVR)
extern void WriteEEPROM(unsigned char address, unsigned char val);
extern unsigned char ReadEEPROM(unsigned char address);
#endif
extern void at_initprocessor(void);
extern void at_process(void);
#define MODEREAD 1
#define MODEWRITE 2
typedef void (*WORKERFN)(void);
#define WFUNC(x) extern void wfn##x(void); const WORKERFN WFN_##x = wfn##x;
#ifdef INCLUDE_SDDOS
#define SDOS_SECTOR_SIZE 256
typedef struct
{
char filename[13];
unsigned char attribs;
}
imgInfo;
extern unsigned char *sectorData;
#endif
#endif // __MMC2_H