an hardcoded demo
prints "RE", a vertical line, and a counter
This commit is contained in:
parent
1764a5f2b3
commit
53da6b7171
21
main.c
21
main.c
@ -1,6 +1,7 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include "const.h"
|
||||
#include <string.h>
|
||||
|
||||
volatile uint16_t frame;
|
||||
volatile uint16_t line;
|
||||
@ -27,8 +28,24 @@ void setup_c() {
|
||||
void loop_c() {
|
||||
for (;;) {
|
||||
const int current_line = line;
|
||||
line_buffer[20] = (current_line > 50 && current_line < 100) ? WHITE : BLACK;
|
||||
if (current_line % 8 == 0) {
|
||||
switch (current_line) {
|
||||
case 76: case 134: memcpy(line_buffer, "AAAAAAAAAAAAAAAAAAAAAA", 22); break;
|
||||
case 80: memcpy(line_buffer, "11111111AAAA1111111111", 22); break;
|
||||
case 84: memcpy(line_buffer, "111111111AAA1111111111", 22); break;
|
||||
case 88: case 98: memcpy(line_buffer, "11AAAAA111AA11AAAAAAAA", 22); break;
|
||||
case 92: memcpy(line_buffer, "11AAAAAA11AA11AAAAAAAA", 22); break;
|
||||
case 102: memcpy(line_buffer, "111111111AAA11111111AA", 22); break;
|
||||
case 106: memcpy(line_buffer, "11111111AAAA11111111AA", 22); break;
|
||||
case 110: memcpy(line_buffer, "11A111AAAAAA11AAAAAAAA", 22); break;
|
||||
case 114: memcpy(line_buffer, "11AA111AAAAA11AAAAAAAA", 22); break;
|
||||
case 118: memcpy(line_buffer, "11AAA111AAAA11AAAAAAAA", 22); break;
|
||||
case 122: memcpy(line_buffer, "11AAAA111AAA11AAAAAAAA", 22); break;
|
||||
case 126: memcpy(line_buffer, "11AAAAA111AA1111111111", 22); break;
|
||||
case 130: memcpy(line_buffer, "11AAAAAA11AA1111111111", 22); break;
|
||||
}
|
||||
line_buffer[60] = (current_line > 50 && current_line < 100) ? WHITE : BLACK;
|
||||
|
||||
if (current_line > 200 && current_line % 8 == 0) {
|
||||
const uint8_t current_number = frame >> 2;
|
||||
for (uint8_t i = 0; i < 8; ++i) {
|
||||
line_buffer[i] = ((current_number >> i) & 0x1) ? WHITE : BLACK;
|
||||
|
Loading…
Reference in New Issue
Block a user