initial commit
[bort-panel.git] / seg.c
CommitLineData
9883c3e4
IS
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
18int 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