forked from gkyle/xaar128
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxaar128.h
53 lines (40 loc) · 1.07 KB
/
xaar128.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
#ifndef XAAR128_H_
#define XAAR128_H_
#ifdef ARDUINO_AVR_MEGA2560
// MEGA SPI: SCK: 52, MISO: 50, MOSI: 51
// Supply / Supply Ctrl pins
#define nSS1 10 // Chip select for XARR 128 1st IC
#define nSS2 7 // Chip select for XARR 128 2nd IC
#define relayVHCH 49
#define relayVHCL 48
#define nCLK 11
#define xVDD 23
#elif AVR_UNO
// UNO SPI: SCK: 13, MISO: 12, MOSI: 11
// Supply / Supply Ctrl pins
#define nSS1 10 // Chip select for XARR 128 1st IC
#define nSS2 7 // Chip select for XARR 128 2nd IC
#define relayVHCH 19
#define relayVHCL 18
#define nCLK 9
#define xVDD 4
#endif
// Output pins
//int PHO = 5;
#define nRESET 8
#define nFIRE 5
// Input pins
#define READY 2 // This will be an interrupt pin.
class Xaar128 {
public:
int readyState = 0;
Xaar128();
void init();
void powerUp();
void powerDown();
void loadBuffer64(byte *val);
void loadData(int pending);
void go(int pending);
bool fire();
};
#endif