-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrappers.ino
44 lines (38 loc) · 1.23 KB
/
wrappers.ino
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
void setboth(int x, int y, int state){
stopISR();
lc.setLed(red,x,y,state);
lc.setLed(green,x,y,state);
startISR();
}
void setone(int address, int x, int y, int state){
stopISR();
lc.setLed(address,x,y,state);
startISR();
}
void clearall(){
stopISR();
lc.clearDisplay(red);
lc.clearDisplay(green);
}
///////// Wrappers for LedControl functions . . . //////////
void SetLed(byte Color, byte Row,byte Col, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setLed(Color,Row,Col,State);
startISR(); // enable interrupts again
}
void SetRow(byte Color, byte Row, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setRow(Color,Row,State);
startISR(); // enable interrupts again
}
void SetColumn(byte Color, byte Col, byte State){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.setColumn(Color,Col,State);
startISR(); // enable interrupts again
}
void ClearMatrix(){
stopISR(); // disable interrupts - stop toggling shutdown when updating
lc.clearDisplay(red);
lc.clearDisplay(green);
startISR(); // enable interrupts again
}