avr-firmwares/drivers/fbticker.c

52 lines
1.0 KiB
C

#include "framebuffer.h"
#include <util/delay.h>
void fbticker_pushcol(uint8_t col) {
fb_shift(col << 1);
_delay_ms(60);
}
void fbticker_putc(unsigned char c) {
switch(c) {
case 'A':
fbticker_pushcol(0x7e);
fbticker_pushcol(0x09);
fbticker_pushcol(0x09);
fbticker_pushcol(0x09);
fbticker_pushcol(0x7e);
break;
case 'B':
fbticker_pushcol(0x7f);
fbticker_pushcol(0x49);
fbticker_pushcol(0x49);
fbticker_pushcol(0x36);
break;
case 'C':
fbticker_pushcol(0x3e);
fbticker_pushcol(0x41);
fbticker_pushcol(0x41);
fbticker_pushcol(0x22);
break;
case 'D':
fbticker_pushcol(0x7f);
fbticker_pushcol(0x41);
fbticker_pushcol(0x41);
fbticker_pushcol(0x3e);
break;
case 'E':
fbticker_pushcol(0x7f);
fbticker_pushcol(0x49);
fbticker_pushcol(0x49);
fbticker_pushcol(0x49);
break;
case 'F':
fbticker_pushcol(0x7f);
fbticker_pushcol(0x09);
fbticker_pushcol(0x09);
fbticker_pushcol(0x09);
break;
}
fbticker_pushcol(0);
}