summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-02-11 09:26:21 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-02-11 09:26:21 +0100
commit0b6cb8a025a812fb482212fce0f2cbcd23526983 (patch)
tree15af3f6db6c91acbd77d89ec9fd722b908915cd0 /src/app
parent13c8b6d390291f1a59eeafeb8360f8a45b7c7c27 (diff)
bad-apple on msp430fr / sharp96: more consistent main loop
Diffstat (limited to 'src/app')
-rw-r--r--src/app/bad-apple-msp430fr-sharp96/main.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/app/bad-apple-msp430fr-sharp96/main.cc b/src/app/bad-apple-msp430fr-sharp96/main.cc
index 67e8fa5..d524f87 100644
--- a/src/app/bad-apple-msp430fr-sharp96/main.cc
+++ b/src/app/bad-apple-msp430fr-sharp96/main.cc
@@ -30,47 +30,48 @@ int main(void)
sharp96.clear();
timer.setup_hz(frame_rate);
+ timer_done = 0;
+ timer.start(1);
while (1) {
for (i = 0; i < (sizeof(frames) / sizeof(frames[0])); i++) {
- timer_done = 0;
- timer.start(1);
-
- for (line = 0; line < 72; line++) {
- sharp96.writeLine(line, img_buf + (12 * 72 * 2) + (12 * line));
- }
-
inflate(frames[i], sizeof(img_buf), img_buf, sizeof(img_buf));
while (!timer_done) {
arch.idle();
}
- timer.stop();
+ timer.stop();
timer_done = 0;
timer.start(1);
for (line = 0; line < 72; line++) {
- sharp96.writeLine(line, img_buf + (12 * line));
+ sharp96.writeLine(line, img_buf + (12 * 72 * 0 ) + (12 * line));
}
while (!timer_done) {
arch.idle();
}
- timer.stop();
+ timer.stop();
timer_done = 0;
timer.start(1);
for (line = 0; line < 72; line++) {
- sharp96.writeLine(line, img_buf + (12 * 72) + (12 * line));
+ sharp96.writeLine(line, img_buf + (12 * 72 * 1) + (12 * line));
}
while (!timer_done) {
arch.idle();
}
timer.stop();
+ timer_done = 0;
+ timer.start(1);
+
+ for (line = 0; line < 72; line++) {
+ sharp96.writeLine(line, img_buf + (12 * 72 * 2) + (12 * line));
+ }
if ((i%10)==0) {
sharp96.toggleVCOM();