commit 6fb802f82715f47cb4bb5df6609afaecb6875d09 Author: Christian Vogel Date: Fri Apr 9 15:21:34 2010 +0200 Added 5x8 font from debian/Ubuntu xfonts-base: - memory footprint from 4k to 480 bytes (compared to 8x8) - 8lines x 19chars on the C123 LCD Added display_goto_xy globally, and an implementation for the C123 LCD controller (st7558) diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile index 7c6ba7a..cd46267 100644 --- a/src/target/firmware/Makefile +++ b/src/target/firmware/Makefile @@ -4,7 +4,8 @@ INCLUDES=-Iinclude/ -I../../../include -I../../shared/libosmocore/include # Various objects that are currently linked into all applications FLASH_OBJS=flash/cfi_flash.o -DISPLAY_OBJS=display/font_r8x8.o display/font_r8x8_horiz.o display/st7558.o display/ssd1783.o display/display.o +DISPLAY_OBJS=display/font_r8x8.o display/font_r8x8_horiz.o display/st7558.o display/ssd1783.o display/display.o \ + display/xfont_5x8_32_to_128.o ABB_OBJS=abb/twl3025.o RF_OBJS=rf/trf6151.o diff --git a/src/target/firmware/apps/hello_world/main.c b/src/target/firmware/apps/hello_world/main.c index d1a566b..5cc7a32 100644 --- a/src/target/firmware/apps/hello_world/main.c +++ b/src/target/firmware/apps/hello_world/main.c @@ -84,6 +84,9 @@ static void l1a_l23_rx_cb(uint8_t dlci, struct msgb *msg) int main(void) { + int i; + unsigned char buf[19]; + board_init(); puts("\n\nHello World from " __FILE__ " program code\n"); puts(hr); @@ -110,7 +113,24 @@ int main(void) #endif display_set_attr(DISP_ATTR_INVERT); - display_puts("Hello World"); + + display_puts("Hello World from \\/"); + display_goto_xy(0,1); + display_puts("OSMOCOM baseband /\\"); + + buf[0]='<'; + buf[17]='>'; + buf[18]='\0'; + + for(i=32;i<128;i++){ + int x=i%16; + int y=i/16; + if(x==0) + display_goto_xy(0,y); + buf[x+1]=i; + if(x==15) + display_puts(buf); + } sercomm_register_rx_cb(SC_DLCI_CONSOLE, console_rx_cb); sercomm_register_rx_cb(SC_DLCI_L1A_L23, l1a_l23_rx_cb); diff --git a/src/target/firmware/display/st7558.c b/src/target/firmware/display/st7558.c index baed9eb..d2162cd 100644 --- a/src/target/firmware/display/st7558.c +++ b/src/target/firmware/display/st7558.c @@ -34,7 +34,7 @@ #define CONTROL_RS_RAM 0x40 #define CONTROL_RS_CMD 0x00 #define Y_ADDR(n) (0x40|((n)&0xf)) -#define X_ADDR(n) (0x80|((n)&0x3f)) +#define X_ADDR(n) (0x80|((n)&0x7f)) static const uint8_t setup[] = { CONTROL_RS_CMD, 0x2e, 0x21, 0x12, 0xc0, 0x0b, 0x20, 0x11, 0x00, 0x40, 0x80 }; static const uint8_t home[] = { CONTROL_RS_CMD, Y_ADDR(0), X_ADDR(0) }; @@ -101,15 +101,29 @@ static void *mcpy(uint8_t *dst, const uint8_t *src, int len) return dst; } -extern const unsigned char fontdata_r8x8[]; +extern const unsigned char fontdata_5x8_fixed[]; + +static void st7558_goto_xy(int xpos,int ypos) +{ + uint8_t gotoxy_buf[3]; + + gotoxy_buf[0]=CONTROL_RS_CMD; + gotoxy_buf[1]=X_ADDR(xpos * 8 /* bytes per char */); + gotoxy_buf[2]=Y_ADDR(ypos); + st7558_write(gotoxy_buf,3); +} static void st7558_putc(unsigned char c) { uint8_t putc_buf[16]; - uint8_t bytes_per_char = 8; + uint8_t bytes_per_char = 5; + + if(c<32 || c>126) + c='?'; + c -= 32; /* we only store ascii 32 .. 127 */ putc_buf[0] = CONTROL_RS_RAM; - mcpy(putc_buf+1, fontdata_r8x8+(c*bytes_per_char), bytes_per_char); + mcpy(putc_buf+1, fontdata_5x8_fixed+(c*bytes_per_char), bytes_per_char); st7558_write(putc_buf, 1+bytes_per_char); } @@ -119,5 +133,7 @@ const struct display_driver st7558_display = { .clrscr = &st7558_clrscr, .set_attr = &st7558_set_attr, .unset_attr = &st7558_unset_attr, + .goto_xy = &st7558_goto_xy, .putc = &st7558_putc, }; + diff --git a/src/target/firmware/display/xfont_5x8_32_to_128.c b/src/target/firmware/display/xfont_5x8_32_to_128.c new file mode 100644 index 0000000..31fab0d --- /dev/null +++ b/src/target/firmware/display/xfont_5x8_32_to_128.c @@ -0,0 +1,575 @@ + +const unsigned char fontdata_5x8_fixed[]={ + +/* char ' ' +--------+ */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char '!' +--------+ */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x5e, /* | @ @@@@ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char '"' +--------+ */ + 0x00, /* | | */ + 0x0e, /* | @@@ | */ + 0x00, /* | | */ + 0x0e, /* | @@@ | */ + 0x00, /* | | */ +/* char '#' +--------+ */ + 0x14, /* | @ @ | */ + 0x7f, /* | @@@@@@@| */ + 0x14, /* | @ @ | */ + 0x7f, /* | @@@@@@@| */ + 0x14, /* | @ @ | */ +/* char '$' +--------+ */ + 0x04, /* | @ | */ + 0x2a, /* | @ @ @ | */ + 0x7f, /* | @@@@@@@| */ + 0x2a, /* | @ @ @ | */ + 0x10, /* | @ | */ +/* char '%' +--------+ */ + 0x00, /* | | */ + 0x16, /* | @ @@ | */ + 0x08, /* | @ | */ + 0x34, /* | @@ @ | */ + 0x00, /* | | */ +/* char '&' +--------+ */ + 0x36, /* | @@ @@ | */ + 0x49, /* | @ @ @| */ + 0x36, /* | @@ @@ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char ''' +--------+ */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x0e, /* | @@@ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char '(' +--------+ */ + 0x00, /* | | */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char ')' +--------+ */ + 0x00, /* | | */ + 0x42, /* | @ @ | */ + 0x3c, /* | @@@@ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char '*' +--------+ */ + 0x54, /* | @ @ @ | */ + 0x38, /* | @@@ | */ + 0x38, /* | @@@ | */ + 0x54, /* | @ @ @ | */ + 0x00, /* | | */ +/* char '+' +--------+ */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ + 0x7c, /* | @@@@@ | */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ +/* char ',' +--------+ */ + 0x00, /* | | */ + 0x80, /* |@ | */ + 0x60, /* | @@ | */ + 0x20, /* | @ | */ + 0x00, /* | | */ +/* char '-' +--------+ */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ + 0x00, /* | | */ +/* char '.' +--------+ */ + 0x00, /* | | */ + 0x40, /* | @ | */ + 0xe0, /* |@@@ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char '/' +--------+ */ + 0x60, /* | @@ | */ + 0x10, /* | @ | */ + 0x08, /* | @ | */ + 0x06, /* | @@ | */ + 0x00, /* | | */ +/* char '0' +--------+ */ + 0x00, /* | | */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x3c, /* | @@@@ | */ + 0x00, /* | | */ +/* char '1' +--------+ */ + 0x00, /* | | */ + 0x44, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char '2' +--------+ */ + 0x64, /* | @@ @ | */ + 0x52, /* | @ @ @ | */ + 0x52, /* | @ @ @ | */ + 0x4c, /* | @ @@ | */ + 0x00, /* | | */ +/* char '3' +--------+ */ + 0x22, /* | @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x4e, /* | @ @@@ | */ + 0x32, /* | @@ @ | */ + 0x00, /* | | */ +/* char '4' +--------+ */ + 0x18, /* | @@ | */ + 0x14, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x10, /* | @ | */ + 0x00, /* | | */ +/* char '5' +--------+ */ + 0x2e, /* | @ @@@ | */ + 0x4a, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x32, /* | @@ @ | */ + 0x00, /* | | */ +/* char '6' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x4a, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x30, /* | @@ | */ + 0x00, /* | | */ +/* char '7' +--------+ */ + 0x02, /* | @ | */ + 0x62, /* | @@ @ | */ + 0x1a, /* | @@ @ | */ + 0x06, /* | @@ | */ + 0x00, /* | | */ +/* char '8' +--------+ */ + 0x34, /* | @@ @ | */ + 0x4a, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x34, /* | @@ @ | */ + 0x00, /* | | */ +/* char '9' +--------+ */ + 0x0c, /* | @@ | */ + 0x52, /* | @ @ @ | */ + 0x52, /* | @ @ @ | */ + 0x3c, /* | @@@@ | */ + 0x00, /* | | */ +/* char ':' +--------+ */ + 0x00, /* | | */ + 0x6c, /* | @@ @@ | */ + 0x6c, /* | @@ @@ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char ';' +--------+ */ + 0x00, /* | | */ + 0x80, /* |@ | */ + 0x6c, /* | @@ @@ | */ + 0x2c, /* | @ @@ | */ + 0x00, /* | | */ +/* char '<' +--------+ */ + 0x00, /* | | */ + 0x18, /* | @@ | */ + 0x24, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ +/* char '=' +--------+ */ + 0x28, /* | @ @ | */ + 0x28, /* | @ @ | */ + 0x28, /* | @ @ | */ + 0x28, /* | @ @ | */ + 0x00, /* | | */ +/* char '>' +--------+ */ + 0x00, /* | | */ + 0x42, /* | @ @ | */ + 0x24, /* | @ @ | */ + 0x18, /* | @@ | */ + 0x00, /* | | */ +/* char '?' +--------+ */ + 0x00, /* | | */ + 0x04, /* | @ | */ + 0x52, /* | @ @ @ | */ + 0x0c, /* | @@ | */ + 0x00, /* | | */ +/* char '@' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x99, /* |@ @@ @| */ + 0xa5, /* |@ @ @ @| */ + 0x1e, /* | @@@@ | */ +/* char 'A' +--------+ */ + 0x7c, /* | @@@@@ | */ + 0x12, /* | @ @ | */ + 0x12, /* | @ @ | */ + 0x7c, /* | @@@@@ | */ + 0x00, /* | | */ +/* char 'B' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x4a, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x34, /* | @@ @ | */ + 0x00, /* | | */ +/* char 'C' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x24, /* | @ @ | */ + 0x00, /* | | */ +/* char 'D' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x42, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x3c, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'E' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x4a, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ +/* char 'F' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x0a, /* | @ @ | */ + 0x0a, /* | @ @ | */ + 0x02, /* | @ | */ + 0x00, /* | | */ +/* char 'G' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x52, /* | @ @ @ | */ + 0x34, /* | @@ @ | */ + 0x00, /* | | */ +/* char 'H' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x08, /* | @ | */ + 0x08, /* | @ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char 'I' +--------+ */ + 0x00, /* | | */ + 0x42, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ +/* char 'J' +--------+ */ + 0x20, /* | @ | */ + 0x42, /* | @ @ | */ + 0x3e, /* | @@@@@ | */ + 0x02, /* | @ | */ + 0x00, /* | | */ +/* char 'K' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x08, /* | @ | */ + 0x34, /* | @@ @ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ +/* char 'L' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x40, /* | @ | */ + 0x40, /* | @ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char 'M' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x0c, /* | @@ | */ + 0x0c, /* | @@ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char 'N' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x0c, /* | @@ | */ + 0x38, /* | @@@ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char 'O' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x42, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x3c, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'P' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x12, /* | @ @ | */ + 0x12, /* | @ @ | */ + 0x0c, /* | @@ | */ + 0x00, /* | | */ +/* char 'Q' +--------+ */ + 0x3c, /* | @@@@ | */ + 0x52, /* | @ @ @ | */ + 0x62, /* | @@ @ | */ + 0xbc, /* |@ @@@@ | */ + 0x00, /* | | */ +/* char 'R' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x12, /* | @ @ | */ + 0x12, /* | @ @ | */ + 0x6c, /* | @@ @@ | */ + 0x00, /* | | */ +/* char 'S' +--------+ */ + 0x24, /* | @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x52, /* | @ @ @ | */ + 0x24, /* | @ @ | */ + 0x00, /* | | */ +/* char 'T' +--------+ */ + 0x00, /* | | */ + 0x02, /* | @ | */ + 0x7e, /* | @@@@@@ | */ + 0x02, /* | @ | */ + 0x00, /* | | */ +/* char 'U' +--------+ */ + 0x3e, /* | @@@@@ | */ + 0x40, /* | @ | */ + 0x40, /* | @ | */ + 0x3e, /* | @@@@@ | */ + 0x00, /* | | */ +/* char 'V' +--------+ */ + 0x1e, /* | @@@@ | */ + 0x60, /* | @@ | */ + 0x60, /* | @@ | */ + 0x1e, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'W' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x30, /* | @@ | */ + 0x30, /* | @@ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char 'X' +--------+ */ + 0x66, /* | @@ @@ | */ + 0x18, /* | @@ | */ + 0x18, /* | @@ | */ + 0x66, /* | @@ @@ | */ + 0x00, /* | | */ +/* char 'Y' +--------+ */ + 0x06, /* | @@ | */ + 0x08, /* | @ | */ + 0x70, /* | @@@ | */ + 0x08, /* | @ | */ + 0x06, /* | @@ | */ +/* char 'Z' +--------+ */ + 0x62, /* | @@ @ | */ + 0x52, /* | @ @ @ | */ + 0x4a, /* | @ @ @ | */ + 0x46, /* | @ @@ | */ + 0x00, /* | | */ +/* char '[' +--------+ */ + 0x00, /* | | */ + 0x7e, /* | @@@@@@ | */ + 0x42, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x00, /* | | */ +/* char '\' +--------+ */ + 0x06, /* | @@ | */ + 0x08, /* | @ | */ + 0x10, /* | @ | */ + 0x60, /* | @@ | */ + 0x00, /* | | */ +/* char ']' +--------+ */ + 0x00, /* | | */ + 0x42, /* | @ @ | */ + 0x42, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char '^' +--------+ */ + 0x00, /* | | */ + 0x04, /* | @ | */ + 0x02, /* | @ | */ + 0x04, /* | @ | */ + 0x00, /* | | */ +/* char '_' +--------+ */ + 0x80, /* |@ | */ + 0x80, /* |@ | */ + 0x80, /* |@ | */ + 0x80, /* |@ | */ + 0x00, /* | | */ +/* char '`' +--------+ */ + 0x00, /* | | */ + 0x02, /* | @ | */ + 0x04, /* | @ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char 'a' +--------+ */ + 0x30, /* | @@ | */ + 0x48, /* | @ @ | */ + 0x48, /* | @ @ | */ + 0x78, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'b' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x48, /* | @ @ | */ + 0x48, /* | @ @ | */ + 0x30, /* | @@ | */ + 0x00, /* | | */ +/* char 'c' +--------+ */ + 0x00, /* | | */ + 0x30, /* | @@ | */ + 0x48, /* | @ @ | */ + 0x48, /* | @ @ | */ + 0x00, /* | | */ +/* char 'd' +--------+ */ + 0x30, /* | @@ | */ + 0x48, /* | @ @ | */ + 0x48, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ +/* char 'e' +--------+ */ + 0x30, /* | @@ | */ + 0x68, /* | @@ @ | */ + 0x58, /* | @ @@ | */ + 0x10, /* | @ | */ + 0x00, /* | | */ +/* char 'f' +--------+ */ + 0x10, /* | @ | */ + 0x7c, /* | @@@@@ | */ + 0x12, /* | @ @ | */ + 0x04, /* | @ | */ + 0x00, /* | | */ +/* char 'g' +--------+ */ + 0x10, /* | @ | */ + 0xa8, /* |@ @ @ | */ + 0xa8, /* |@ @ @ | */ + 0x70, /* | @@@ | */ + 0x00, /* | | */ +/* char 'h' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x08, /* | @ | */ + 0x08, /* | @ | */ + 0x70, /* | @@@ | */ + 0x00, /* | | */ +/* char 'i' +--------+ */ + 0x00, /* | | */ + 0x48, /* | @ @ | */ + 0x7a, /* | @@@@ @ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char 'j' +--------+ */ + 0x00, /* | | */ + 0x40, /* | @ | */ + 0x80, /* |@ | */ + 0x7a, /* | @@@@ @ | */ + 0x00, /* | | */ +/* char 'k' +--------+ */ + 0x7e, /* | @@@@@@ | */ + 0x10, /* | @ | */ + 0x10, /* | @ | */ + 0x68, /* | @@ @ | */ + 0x00, /* | | */ +/* char 'l' +--------+ */ + 0x00, /* | | */ + 0x42, /* | @ @ | */ + 0x7e, /* | @@@@@@ | */ + 0x40, /* | @ | */ + 0x00, /* | | */ +/* char 'm' +--------+ */ + 0x78, /* | @@@@ | */ + 0x08, /* | @ | */ + 0x70, /* | @@@ | */ + 0x08, /* | @ | */ + 0x70, /* | @@@ | */ +/* char 'n' +--------+ */ + 0x78, /* | @@@@ | */ + 0x08, /* | @ | */ + 0x08, /* | @ | */ + 0x70, /* | @@@ | */ + 0x00, /* | | */ +/* char 'o' +--------+ */ + 0x30, /* | @@ | */ + 0x48, /* | @ @ | */ + 0x48, /* | @ @ | */ + 0x30, /* | @@ | */ + 0x00, /* | | */ +/* char 'p' +--------+ */ + 0xf8, /* |@@@@@ | */ + 0x28, /* | @ @ | */ + 0x28, /* | @ @ | */ + 0x10, /* | @ | */ + 0x00, /* | | */ +/* char 'q' +--------+ */ + 0x10, /* | @ | */ + 0x28, /* | @ @ | */ + 0x28, /* | @ @ | */ + 0xf8, /* |@@@@@ | */ + 0x00, /* | | */ +/* char 'r' +--------+ */ + 0x78, /* | @@@@ | */ + 0x10, /* | @ | */ + 0x08, /* | @ | */ + 0x10, /* | @ | */ + 0x00, /* | | */ +/* char 's' +--------+ */ + 0x00, /* | | */ + 0x50, /* | @ @ | */ + 0x58, /* | @ @@ | */ + 0x28, /* | @ @ | */ + 0x00, /* | | */ +/* char 't' +--------+ */ + 0x08, /* | @ | */ + 0x3e, /* | @@@@@ | */ + 0x48, /* | @ @ | */ + 0x20, /* | @ | */ + 0x00, /* | | */ +/* char 'u' +--------+ */ + 0x38, /* | @@@ | */ + 0x40, /* | @ | */ + 0x40, /* | @ | */ + 0x78, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'v' +--------+ */ + 0x00, /* | | */ + 0x38, /* | @@@ | */ + 0x40, /* | @ | */ + 0x38, /* | @@@ | */ + 0x00, /* | | */ +/* char 'w' +--------+ */ + 0x38, /* | @@@ | */ + 0x40, /* | @ | */ + 0x30, /* | @@ | */ + 0x40, /* | @ | */ + 0x38, /* | @@@ | */ +/* char 'x' +--------+ */ + 0x48, /* | @ @ | */ + 0x30, /* | @@ | */ + 0x30, /* | @@ | */ + 0x48, /* | @ @ | */ + 0x00, /* | | */ +/* char 'y' +--------+ */ + 0x58, /* | @ @@ | */ + 0xa0, /* |@ @ | */ + 0xa0, /* |@ @ | */ + 0x78, /* | @@@@ | */ + 0x00, /* | | */ +/* char 'z' +--------+ */ + 0x48, /* | @ @ | */ + 0x68, /* | @@ @ | */ + 0x58, /* | @ @@ | */ + 0x48, /* | @ @ | */ + 0x00, /* | | */ +/* char '{' +--------+ */ + 0x08, /* | @ | */ + 0x2a, /* | @ @ @ | */ + 0x55, /* | @ @ @ @| */ + 0x41, /* | @ @| */ + 0x00, /* | | */ +/* char '|' +--------+ */ + 0x00, /* | | */ + 0x00, /* | | */ + 0x7e, /* | @@@@@@ | */ + 0x00, /* | | */ + 0x00, /* | | */ +/* char '}' +--------+ */ + 0x41, /* | @ @| */ + 0x55, /* | @ @ @ @| */ + 0x2a, /* | @ @ @ | */ + 0x08, /* | @ | */ + 0x00, /* | | */ +/* char '~' +--------+ */ + 0x04, /* | @ | */ + 0x02, /* | @ | */ + 0x04, /* | @ | */ + 0x02, /* | @ | */ + 0x00 /* | | */ +/* +--------+ */ +}; diff --git a/src/target/firmware/include/display.h b/src/target/firmware/include/display.h index b49ae7b..0ba7a4c 100644 --- a/src/target/firmware/include/display.h +++ b/src/target/firmware/include/display.h @@ -39,6 +39,12 @@ static inline int display_putchar(unsigned char c) { return display->putc(c); } + +static inline void display_goto_xy(int xpos,int ypos) +{ + display->goto_xy(xpos,ypos); +} + int display_puts(const char *s); extern const struct display_driver st7558_display;