chore: refactor to allmann

This commit is contained in:
2023-04-10 17:57:58 +02:00
parent 820ef77d47
commit 12a55275a5

8
main.c
View File

@@ -48,7 +48,7 @@ int main() {
}; };
static const uint8_t ha5kfu[] = static const uint8_t ha5kfu[] =
{0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x41, 0x35, 0x4B, 0x46, 0x55, 0x20, 0x20, 0x20}; {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x41, 0x35, 0x4B, 0x46, 0x55, 0x20, 0x20, 0x20};
static const uint8_t blank[] = static const uint8_t blank[] =
{0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20}; {0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20};
static const uint8_t even_frame[] = static const uint8_t even_frame[] =
{0x07, 0x05, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00}; {0x07, 0x05, 0x03, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00};
@@ -63,9 +63,11 @@ int main() {
set_DCRAM(0, ha5kfu, DISPLAY_DIGITS); set_DCRAM(0, ha5kfu, DISPLAY_DIGITS);
set_display_mode(NORMAL_MODE); set_display_mode(NORMAL_MODE);
_delay_ms(1000); _delay_ms(1000);
while (1) { while (1)
{
set_DCRAM(0, blank, DISPLAY_DIGITS); set_DCRAM(0, blank, DISPLAY_DIGITS);
for (int i = 0; i < DISPLAY_DIGITS; ++i) { for (int i = 0; i < DISPLAY_DIGITS; ++i)
{
if (i % 2 == 0) if (i % 2 == 0)
set_DCRAM(0, even_frame, i); set_DCRAM(0, even_frame, i);
else else