-
Notifications
You must be signed in to change notification settings - Fork 0
/
SekvojRackSDPreset.h
46 lines (38 loc) · 1.3 KB
/
SekvojRackSDPreset.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
/*
* SekvojRackSDPreset.h
*
* Created on: Dec 16, 2014
* Author: dasvaclav
*/
#ifndef SEKVOJRACKSDPRESET_H_
#define SEKVOJRACKSDPRESET_H_
#define OFFSET 32768
class SekvojRackSDPreset
{
public:
SekvojRackSDPreset();
void debug();
void initCard(unsigned char * data, unsigned char * settingsData);
void getPatternData(unsigned char patternIndex);
void setPatternData(unsigned char patternIndex);
void getSettingsData(unsigned char * data);
void setSettingsData(unsigned char * data);
void loadData(unsigned char patternIndex,
unsigned int sourceOffset,
unsigned int targetOffset,
unsigned int size);
unsigned char getCurrentPattern(){return currentPattern;};
void save(unsigned int * manipulatedPatternsBitArray);
void discard(unsigned int * manipulatedPatternsBitArray);
void copyAllData(unsigned long fromOffset, unsigned long toOffset , unsigned int * manipulatedPatternsBitArray = 0);
private:
unsigned char currentPattern;
unsigned char * dataReference_;
};
inline void SekvojRackSDPreset::save(unsigned int * manipulatedPatternsBitArray) {
copyAllData(0, OFFSET, manipulatedPatternsBitArray);
}
inline void SekvojRackSDPreset::discard(unsigned int * manipulatedPatternsBitArray) {
copyAllData(OFFSET, 0, manipulatedPatternsBitArray);
}
#endif /* SEKVOJRACKSDPRESET_H_ */