altos: ADS124S0X driver compiles now
[fw/altos] / src / cortexelf-v1 / ao_hex.c
1 /*
2  * Copyright © 2017 Keith Packard <keithp@keithp.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  */
14
15 #include <ao.h>
16 #include "ao_hex.h"
17 #include "ao_as1107.h"
18 #include "ao_1802.h"
19
20 static struct ao_task   ao_hex_task;
21
22 static void
23 ao_hex(void)
24 {
25         for (;;) {
26                 ao_as1107_write_16(0, ADDRESS);
27                 ao_as1107_write_8(6, DATA);
28                 ao_sleep(&ADDRESS);
29         }
30 }
31
32 void
33 ao_hex_init(void)
34 {
35         ao_add_task(&ao_hex_task, ao_hex, "hex");
36 }