Small cleanups
[uccvend-snackrom.git] / ROM2 / main_basic.c
1 /*
2  * main_basic.c - a simplified main procedure that relies upon a ersver to do
3  * anything smart. Just be a dumb interface to a display, keypad, coin mech
4  * and snacks.
5  */
6
7 #include "display_basic.h"
8 #include "keypad.h"
9 #include "chime.h"
10 #include "server.h"
11 #include "coinmech.h"
12 #include "vend.h"
13
14 void _start() {
15         set_bus_expanded();
16         display_init();
17         /* enable RTI & set rate */
18         /* init coin mech */
19         /* scan for motors */
20         main();
21 }
22
23 int main() {
24         while(1) {
25                 /*
26                  * have serial packet?
27                  *
28                  * decode msg & process:
29                  *   - dispense motor
30                  *   - display string
31                  *   - give change
32                  *   - beep
33                  */
34                 
35                 /*
36                  * have keypress?
37                  *   - beep
38                  *   - send via serial
39                  */
40
41                 /*
42                  * have coin balance change?
43                  *   - send via serial
44                  */
45         }
46 }
47
48 void rti() {
49         chime(); /* turn chime on or off as need be */
50 }

UCC git Repository :: git.ucc.asn.au