2022-07-14 23:11:23 +00:00
|
|
|
#include <display.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(void) {
|
|
|
|
display_t display = {
|
|
|
|
.reg = {
|
2022-07-20 01:17:01 +00:00
|
|
|
.output = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 7 },
|
|
|
|
.shift_clock = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 6 },
|
|
|
|
.latch_clock = { .ddr = &DDRF, .port = &PORTF, .pin = &PINF, .addr = 5 },
|
2022-07-14 23:11:23 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
int count = 0;
|
|
|
|
while (1) {
|
|
|
|
display_init(&display);
|
|
|
|
|
|
|
|
char msg[15];
|
|
|
|
snprintf(msg, 15, "[%d]", count);
|
|
|
|
display_clear(&display);
|
|
|
|
display_write_message(&display, msg);
|
|
|
|
_delay_ms(1000);
|
|
|
|
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|