Skip to content
Snippets Groups Projects
Unverified Commit 0b6cb8a0 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

bad-apple on msp430fr / sharp96: more consistent main loop

parent 13c8b6d3
No related branches found
No related tags found
No related merge requests found
Pipeline #93 failed
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment