diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-10 21:46:45 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-10 21:46:45 +0100 |
commit | cdf3c02cb8b7a557e8aeeda5b7e13b3139a41b0e (patch) | |
tree | 19f8666708075c2a9c40f054b1c13cadcca8d20f /src/app/sharp96-bad-apple/main.cc | |
parent | ef9d29ee0ecef0da260388300f354de48b1032c1 (diff) |
rename sharp96-bad-apple to bad-apple-msp430fr-sharp96
Diffstat (limited to 'src/app/sharp96-bad-apple/main.cc')
-rw-r--r-- | src/app/sharp96-bad-apple/main.cc | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/src/app/sharp96-bad-apple/main.cc b/src/app/sharp96-bad-apple/main.cc deleted file mode 100644 index 67e8fa5..0000000 --- a/src/app/sharp96-bad-apple/main.cc +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2020 Birte Kristina Friesel - * - * SPDX-License-Identifier: BSD-2-Clause - */ -#include "arch.h" -#include "driver/gpio.h" -#include "driver/stdout.h" -#include "driver/spi.h" -#include "driver/sharp96.h" -#include "lib/inflate.h" - -#include "driver/timer.h" -volatile unsigned char timer_done = 0; - -#include "frames.cc" - -__attribute__((section(".leaRAM"))) unsigned char img_buf[(72 * 96 / 8) * 3]; - -int main(void) -{ - unsigned int i = 0; - unsigned char line; - arch.setup(); - gpio.setup(); - kout.setup(); - spi.setup(); - sharp96.setup(); - sharp96.powerOn(); - sharp96.clear(); - - timer.setup_hz(frame_rate); - - 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_done = 0; - timer.start(1); - - for (line = 0; line < 72; line++) { - sharp96.writeLine(line, img_buf + (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) + (12 * line)); - } - - while (!timer_done) { - arch.idle(); - } - timer.stop(); - - if ((i%10)==0) { - sharp96.toggleVCOM(); - } - } - } - - return 0; -} - -ON_TIMER_INTERRUPT_head - timer_done = 1; -ON_TIMER_INTERRUPT_tail |