git.ucc.asn.au
/
uccvend-snackrom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A bunch of UI glitches and silly errors.
[uccvend-snackrom.git]
/
ROM2
/
chime.c
diff --git
a/ROM2/chime.c
b/ROM2/chime.c
index
e959c1a
..
37ec78a
100644
(file)
--- a/
ROM2/chime.c
+++ b/
ROM2/chime.c
@@
-1,7
+1,8
@@
#include "vend.h"
#include "chime.h"
#include "vend.h"
#include "chime.h"
-u8 chime_count;
+volatile u8 chime_count;
+volatile u8 unchime_count; /* silence counter */
void chime() {
/* called from the RTI interrupt, sees if we need to turn the chime on or
void chime() {
/* called from the RTI interrupt, sees if we need to turn the chime on or
@@
-9,8
+10,9
@@
void chime() {
*/
if (chime_count) {
chime_on();
*/
if (chime_count) {
chime_on();
- --chime_count;
+ --chime_count;
/* interrupts masked here, so this won't result in badness */
} else
chime_off();
} else
chime_off();
+ if (unchime_count) --unchime_count;
}
}
UCC
git Repository :: git.ucc.asn.au