projects
/
bort-panel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
462b03f73667b9bc032501e5e0cdf87b112c6082
[bort-panel.git]
/
seg.c
1
#include <stdlib.h>
2
#include <fcntl.h>
3
#include <signal.h>
4
#include <unistd.h>
5
#include <string.h>
6
#include <stdio.h>
7
#include <time.h>
8
9
#include <sys/types.h>
10
#include <sys/gpio.h>
11
#include <sys/ioctl.h>
12
13
#include
"seg.h"
14
15
#define UP(N) set_pin(N, 1)
16
#define DOWN(N) set_pin(N, 0)
17
18
int
main
(
int
argc
,
char
*
argv
[]) {
19
20
signal
(
SIGINT
,
inth
);
21
22
config_pins
();
23
pincnt
();
24
25
start
();
26
byte
(
0x40
);
27
stop
();
28
start
();
29
byte
(
0xc0
|
0x01
);
30
31
byte
(
0xdd
);
32
byte
(
0xdd
);
33
byte
(
0xdd
);
34
byte
(
0xdd
);
35
byte
(
0xdd
);
36
byte
(
0xdd
);
37
byte
(
0xdd
);
38
byte
(
0xdd
);
39
byte
(
0xdd
);
40
byte
(
0xdd
);
41
42
stop
();
43
44
start
();
45
byte
(
DISP_ON
);
46
stop
();
47
48
inth
(
0
);
49
return
0
;
50
}
51
52