Export some functions that might be useful
[uccvend-snackrom.git] / ROM2 / chime.h
1 #ifndef _CHIME_H_
2 #define _CHIME_H_
3
4 #include "types.h"
5 #include "vend.h"
6
7 #define CHIME_TIME 5 /* number of RTIs to have the chime on (6.6ms each) */
8
9 extern u8 chime_count;
10
11 /* outside world interface */
12 extern inline void chime_start() { chime_count = CHIME_TIME; }
13
14 void chime(); /* RTI interrupt */
15
16 /* internal helpers, also could be called from outside world */
17 extern inline void chime_on() { bset((void*)&_io_ports[M6811_PORTA], PORTA_CHIME); }
18 extern inline void chime_off() { bclr((void*)&_io_ports[M6811_PORTA], PORTA_CHIME);}
19
20 #endif /* _CHIME_H_ */

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