mirror of
https://github.com/Derisis13/AT-VFD.git
synced 2025-12-06 19:32:49 +01:00
chore: refactor to allmann
This commit is contained in:
8
main.c
8
main.c
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user