-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsdload.h
More file actions
44 lines (32 loc) · 988 Bytes
/
sdload.h
File metadata and controls
44 lines (32 loc) · 988 Bytes
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
//
// sdload.h
//
#ifndef _SDLOAD_H_
#define _SDLOAD_H_
#include <circle/actled.h>
#include <circle/types.h>
#include <SDCard/emmc.h>
#include <fatfs/ff.h>
#define MAX_PATCHES 8
#define DRIVE "SD:"
class CInterruptSystem;
class CTimer;
class CSDLoad
{
public:
CSDLoad(CInterruptSystem* pInterrupt, CTimer* pTimer);
bool Initialize(); // Mount and read file from SD
const char* GetPatchBuffer(unsigned index) const { return m_patchBuffer[index]; }
unsigned GetPatchBufferSize(unsigned index) const { return m_patchBufferSize[index]; }
unsigned GetPatchCount() const { return m_patchCount; }
bool LoadPatches();
private:
CEMMCDevice m_EMMC;
FATFS m_FileSystem;
CActLED m_ActLED;
static const unsigned MAX_BUFFER_SIZE = 4096; //4kb max text size
char m_patchBuffer[MAX_PATCHES][MAX_BUFFER_SIZE];
unsigned m_patchBufferSize[MAX_PATCHES];
unsigned m_patchCount;
};
#endif