-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnix.h
64 lines (50 loc) · 1.65 KB
/
nix.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
/* vim:set ts=4 sw=4 tw=80 et ai si cindent cino=L0,b1,(1s,U1,m1,j1,J1,)50,*90 cinkeys=0{,0},0),0],\:,0#,!^F,o,O,e,0=break:
*/
/**********************************************************************
Witch Staff
Copyright (C) 2023 Krayon
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 ONLY, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program, in the file COPYING or COPYING.txt; if
not, see http://www.gnu.org/licenses/ , or write to:
The Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**********************************************************************/
#ifndef _NIX_H_
#define _NIX_H_
#include <stdio.h>
#include <unistd.h>
#include "main.h"
#define PD1 1
#define PD4 4
#define PIND pind
#define PORTB portb
#define DDRB ddrb
#define DDRD ddrd
int ddrb = 0;
int ddrd = 0;
int pind = 1;
int portb = 0;
struct cRGB {
int r;
int g;
int b;
};
void _delay_ms(int ms) {
usleep(ms);
}
void ws2812_setleds(struct cRGB *led, int led_count) {
int n;
printf("ws2812_setleds:\n");
for (n = 0; n < LED_COUNT; ++n) {
printf(" LED[%2d]: %.3d, %.3d, %.3d\n", n, led[n].r, led[n].g, led[n].b);
}
return;
}
#endif /* _NIX_H_ */