# HG changeset patch # User jeandet # Date 2013-05-22 20:55:21 # Node ID 1ef095ac0ee35742f4a40241c32cc152c7987470 # Parent 144bdeadc77a558201b71947eeca6eb7b4a5f32e Factorised stream device structure to reduce memory usage. Improved Graphical terminal for multi instances. diff --git a/bsp/src/BEAGLESYNTH/bsp.c b/bsp/src/BEAGLESYNTH/bsp.c --- a/bsp/src/BEAGLESYNTH/bsp.c +++ b/bsp/src/BEAGLESYNTH/bsp.c @@ -14,7 +14,7 @@ -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- -- Author : Alexis Jeandet -- Mail : alexis.jeandet@gmail.com @@ -29,6 +29,8 @@ #include #include #include +#include + uint32_t OSC0 =8000000; uint32_t INTOSC =16000000; uint32_t RTCOSC =32768; @@ -54,6 +56,8 @@ LCD_t lcd0={ .height = 320 }; +terminal_t terminal0; + volatile int16_t* lcd0_CMD=(volatile int16_t*) 0x60000000; volatile int16_t* lcd0_DATA=(volatile int16_t*)(0x61FFFFF0); @@ -70,11 +74,12 @@ int bsp_init() bsp_uart_init(); bsp_iic_init(); bsp_FSMC_init(); - printf("\r================================================================\n\r"); - printf("================================================================\n\r"); + bsp_GTerm_init(); + printf("\r=====================\n\r"); + printf( "=====================\n\r"); printf(BSP); printf(" initialised\n\r"); - printf("================================================================\n\r"); + printf( "=====================\n\r"); return 1; } @@ -107,26 +112,26 @@ void bsp_GPIO_init() void bsp_uart_init() { - if(__opnfiles__[1]==NULL) - { - //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); - streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); - uart_t uart = uartopenandconfig(uart1,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); - uartmkstreamdev(uart,fd1); - __opnfiles__[1] = fd1; - } - else - { - uartopenandconfig(0,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); - } + //if(__opnfiles__[1]==NULL) + //{ + //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); + // streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); + // uart_t uart = uartopenandconfig(uart1,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); + //uartmkstreamdev(uart,fd1); + //__opnfiles__[1] = fd1; + //} + //else + //{ + uartopenandconfig(0,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); + //} } int bsp_FSMC_init() { - #define GPIOGETPORT(gpio) ((GPIO_TypeDef*)(((((uint32_t)gpio) & (uint32_t)0x0000FF00)*(uint32_t)4) + (uint32_t)GPIOA)) - #define GPIOPORTNUM(gpio) (((uint32_t)(gpio) & (uint32_t)0x0000FF00)>>(uint32_t)8) +#define GPIOGETPORT(gpio) ((GPIO_TypeDef*)(((((uint32_t)gpio) & (uint32_t)0x0000FF00)*(uint32_t)4) + (uint32_t)GPIOA)) +#define GPIOPORTNUM(gpio) (((uint32_t)(gpio) & (uint32_t)0x0000FF00)>>(uint32_t)8) gpio_t gpio1 = gpioopen(LCD_RESET); gpiosetspeed(&gpio1,gpiohighspeed); @@ -149,8 +154,8 @@ int bsp_FSMC_init() /* Enable FSMC clock */ RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE); - /*-- FSMC Configuration ------------------------------------------------------*/ - /*----------------------- SRAM Bank 3 ----------------------------------------*/ + /*-- FSMC Configuration ------------------------------------------------------*/ + /*----------------------- SRAM Bank 3 ----------------------------------------*/ /* FSMC_Bank1_NORSRAM4 configuration */ //p.FSMC_AddressSetupTime = 5; p.FSMC_AddressSetupTime = 1; @@ -249,7 +254,7 @@ void bsp_lcd0_write_reg(uint32_t reg,uin uint32_t bsp_lcd0_read_reg(uint32_t reg) { *lcd0_CMD=(uint16_t)reg; - return (uint16_t)*lcd0_DATA; + return (uint16_t)*lcd0_DATA; } void bsp_lcd0_writeGRAM(void* buffer,uint32_t count) @@ -258,7 +263,7 @@ void bsp_lcd0_writeGRAM(void* buffer,uin uint16_t* castedBuff=(uint16_t*)buffer; for(int i=0;i<(int)count;i++) { - *lcd0_DATA=castedBuff[i]; + *lcd0_DATA=castedBuff[i]; } } @@ -269,10 +274,35 @@ void bsp_lcd0_readGRAM(void* buffer,uint castedBuff[0]=*lcd0_DATA; for(int i=0;i<(int)count;i++) { - castedBuff[i]=*lcd0_DATA; + castedBuff[i]=*lcd0_DATA; + } +} + + +void bsp_GTerm_init() +{ + if(__opnfiles__[1]==NULL) + { + //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); + streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); + terminal_init(&terminal0 ,&lcd0,&ComicSansMS_8,fd1); + __opnfiles__[1] = fd1; + } + else + { + } } + + + + + + + + + diff --git a/bsp/src/BEAGLESYNTH/bsp.h b/bsp/src/BEAGLESYNTH/bsp.h --- a/bsp/src/BEAGLESYNTH/bsp.h +++ b/bsp/src/BEAGLESYNTH/bsp.h @@ -64,6 +64,7 @@ extern void bsp_uart_init(); extern void bsp_iic_init(); extern void bsp_spi_init(); extern void bsp_SD_init(); +extern void bsp_GTerm_init(); extern int bsp_FSMC_init(); /* VS1053 */ diff --git a/bsp/src/STM32F4Eval/bsp.c b/bsp/src/STM32F4Eval/bsp.c --- a/bsp/src/STM32F4Eval/bsp.c +++ b/bsp/src/STM32F4Eval/bsp.c @@ -29,6 +29,7 @@ #include #include #include +#include uint32_t OSC0 =8000000; uint32_t INTOSC =16000000; uint32_t RTCOSC =32768; @@ -54,6 +55,9 @@ LCD_t lcd0={ .height = 320 }; +terminal_t terminal0; + + volatile int16_t* lcd0_CMD=(volatile int16_t*) (0x60000000 | 0x08000000); volatile int16_t* lcd0_DATA=((volatile int16_t*)(0x60000000 | 0x08000002)); @@ -70,12 +74,12 @@ int bsp_init() bsp_uart_init(); bsp_iic_init(); bsp_FSMC_init(); - lcd0.init(&lcd0); - printf("\r================================================================\n\r"); - printf("================================================================\n\r"); + bsp_GTerm_init(); + printf("\r=====================\n\r"); + printf( "=====================\n\r"); printf(BSP); printf(" initialised\n\r"); - printf("================================================================\n\r"); + printf( "=====================\n\r"); return 1; } @@ -94,18 +98,18 @@ void bsp_GPIO_init() void bsp_uart_init() { - if(__opnfiles__[1]==NULL) - { - //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); - streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); - uart_t uart = uartopenandconfig(uart3,uartparitynone | uart8bits | uartonestop,115200,PC10,PC11,-1,-1); - uartmkstreamdev(uart,fd1); - __opnfiles__[1] = fd1; - } - else - { - uartopenandconfig(uart3,uartparitynone | uart8bits | uartonestop,115200,PC10,PC11,-1,-1); - } + //if(__opnfiles__[1]==NULL) + //{ + //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); + // streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); + // uart_t uart = uartopenandconfig(uart1,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); + //uartmkstreamdev(uart,fd1); + //__opnfiles__[1] = fd1; + //} + //else + //{ + uartopenandconfig(0,uartparitynone | uart8bits | uartonestop,115200,PA9,PA10,-1,-1); + //} } /* @@ -231,8 +235,7 @@ int bsp_FSMC_init() /*!< Enable FSMC Bank1_SRAM2 Bank */ FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE); - - + lcd0.init(&lcd0); return 1; } @@ -321,6 +324,22 @@ void bsp_lcd0_readGRAM(void* buffer,uint } } +void bsp_GTerm_init() +{ + if(__opnfiles__[1]==NULL) + { + //uart_t* uart1 = (uart_t*)malloc(sizeof(uart_t)); + streamdevice* fd1 = (streamdevice*)malloc(sizeof(streamdevice)); + + ili9328paintFilRect(&lcd0,0,0,240,320,0x7FFF,5,0); + terminal_init(&terminal0,&lcd0,&ComicSansMS_8,fd1); + __opnfiles__[1] = fd1; + } + else + { + + } +} diff --git a/bsp/src/STM32F4Eval/bsp.h b/bsp/src/STM32F4Eval/bsp.h --- a/bsp/src/STM32F4Eval/bsp.h +++ b/bsp/src/STM32F4Eval/bsp.h @@ -52,6 +52,7 @@ extern void bsp_uart_init(); extern void bsp_iic_init(); extern void bsp_spi_init(); extern void bsp_SD_init(); +extern void bsp_GTerm_init(); extern int bsp_FSMC_init(); /* VS1053 */ diff --git a/examples/BeagleSynthHelloSupMon/BeagleSynthHelloSupMon.pro b/examples/BeagleSynthHelloSupMon/BeagleSynthHelloSupMon.pro new file mode 100644 --- /dev/null +++ b/examples/BeagleSynthHelloSupMon/BeagleSynthHelloSupMon.pro @@ -0,0 +1,14 @@ +TEMPLATE = app +CONFIG += cpu + + +UCMODEL=stm32f4 +DEFINES += CPUFREQ=160000000 + +#BSP = BEAGLESYNTH +#BSP = SOLAR_LFR_PSU +BSP = STM32F4Eval + +SOURCES += \ + main.c + diff --git a/examples/BeagleSynthHelloSupMon/main.c b/examples/BeagleSynthHelloSupMon/main.c new file mode 100644 --- /dev/null +++ b/examples/BeagleSynthHelloSupMon/main.c @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +extern streamdevice* __opnfiles__[]; + +#define LCD_COLOR_WHITE 0xFFFF +#define LCD_COLOR_BLACK 0x0000 +#define LCD_COLOR_GREY 0xF7DE +#define LCD_COLOR_BLUE 0x001F +#define LCD_COLOR_BLUE2 0x051F +#define LCD_COLOR_RED 0xF800 +#define LCD_COLOR_MAGENTA 0xF81F +#define LCD_COLOR_GREEN 0x07E0 +#define LCD_COLOR_CYAN 0x7FFF +#define LCD_COLOR_YELLOW 0xFFE0 + +#ifndef PSU_DISABLE +#define PSU_DISABLE LED1 +#endif + + +int main() +{ + delay_100us(20000); + INA226_t ina5VSens,ina33VSens,ina15VSens; + gpioset(PSU_DISABLE);//enable psu! + ili9328paintFilRect(&lcd0,0,0,240,320,LCD_COLOR_BLACK,1,LCD_COLOR_BLACK); + if(-1==ina226open(&ina33VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,0,15,1000000)) + { + printf("Can't open 3.3V monitor\n\r"); + } + if(-1==ina226open(&ina5VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,0,1,15,1000000)) + { + printf("Can't open 5V monitor\n\r"); + } + if(-1==ina226open(&ina15VSens,i2c2,INA226_MODE_SHUNT_VOLTAGE_CONTINUOUS|INA226_AVERAGES_16|INA226_BUS_CONV_8244us|INA226_SHUNT_CONV_8244us,1,0,15,1000000)) + { + printf("Can't open 1.5V monitor\n\r"); + } + int current5V,current33V,current15V; + while(1) + { + current5V = ina226getCurrent(&ina5VSens); + current33V = ina226getCurrent(&ina33VSens); + current15V = ina226getCurrent(&ina15VSens); + printf("%dmA\n",current15V/1000); + printf("%dmA\n",current33V/1000); + printf("%dmA\n",current5V/1000); + } + printf("Exit\n\r"); + return 0; +} + + + + + + + + + diff --git a/examples/examples.pro b/examples/examples.pro --- a/examples/examples.pro +++ b/examples/examples.pro @@ -7,7 +7,9 @@ SUBDIRS += QtTest/test.pro \ M4StickV2 \ lcdHello \ BeagleSynthHello \ - lcdTerminal + lcdTerminal \ + BeagleSynthHelloSupMon \ + TEST_CMSIS_FFT diff --git a/examples/lcdTerminal/main.c b/examples/lcdTerminal/main.c --- a/examples/lcdTerminal/main.c +++ b/examples/lcdTerminal/main.c @@ -26,8 +26,6 @@ extern streamdevice* __opnfiles__[__MAX_ #define LCD_COLOR_CYAN 0x7FFF #define LCD_COLOR_YELLOW 0xFFE0 -extern int __lineCount__; -extern int __columnCount__; int main() { @@ -37,17 +35,18 @@ int main() for(int i=0;i<16;i++)outterbuffer[i]=LCD_COLOR_RED; ili9328paintFilRect(&lcd0,0,0,240,320,LCD_COLOR_CYAN,5,LCD_COLOR_BLACK); - streamdevice* terminal=__opnfiles__[1]; - terminal_init(&lcd0,&ComicSansMS_18,terminal); - //terminal->write(terminal,"Hi",1, 2); - //lcd0.paintText(&lcd0,"Hello",10,50,&ComicSansMS_18,0xFF00); - // __opnfiles__[1]=terminal; - //__opnfiles__[0]=terminal; - int i=1; - //printf("hello World %d",i); - - printf("Line cnt :\n \t%d\n",__lineCount__); - printf("Column cnt :\n \t%d\n",__columnCount__); + streamdevice* fd1=__opnfiles__[1]; + streamdevice fd2; + int i=0; + terminal_t terminal0,terminal1; + terminal_init(&terminal0,&lcd0,&ComicSansMS_18,fd1); + terminal_init(&terminal1,&lcd0,&ComicSansMS_18,&fd2); + terminal_setgeometry(&terminal0,5,5,terminal0.LCD->width-10,(terminal0.LCD->height/2)-10); + terminal_setbackgroundColor(&terminal1,0xFFFF); + terminal_settextColor(&terminal1,0x0000); + terminal_setgeometry(&terminal1,5,(terminal0.LCD->height/2)+5,terminal0.LCD->width-10,(terminal0.LCD->height/2)-10); + printf("Line cnt :\n \t%d\n",terminal0.lineCount); + printf("Column cnt :\n \t%d\n",terminal0.columnCount); printf("CPU Freq :\n \t%dMHz\n",getCpuFreq()/1000000); while(1) { diff --git a/lib/src/common/FILE_SYSTEM/DIRENT/ucdirent.c b/lib/src/common/FILE_SYSTEM/DIRENT/ucdirent.c --- a/lib/src/common/FILE_SYSTEM/DIRENT/ucdirent.c +++ b/lib/src/common/FILE_SYSTEM/DIRENT/ucdirent.c @@ -0,0 +1,1 @@ +#include diff --git a/lib/src/common/GRAPHIC/GUI/FONTS/fonts8pts.c b/lib/src/common/GRAPHIC/GUI/FONTS/fonts8pts.c --- a/lib/src/common/GRAPHIC/GUI/FONTS/fonts8pts.c +++ b/lib/src/common/GRAPHIC/GUI/FONTS/fonts8pts.c @@ -602,6 +602,1343 @@ const uint8_t ComicSansMS_24_TBL[] = { }; + +/* Character bitmaps for Comic Sans MS 8pt */ +const uint8_t comicSansMS_8ptBitmaps[] = +{ + // @0 ' ' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @24 '!' (11 pixels wide) + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @48 '"' (11 pixels wide) + 0x00, 0x00, // + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @72 '#' (11 pixels wide) + 0x00, 0x00, // + 0x10, 0x01, // # # + 0x10, 0x01, // # # + 0xFC, 0x03, // ######## + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0xFE, 0x01, // ######## + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @96 '$' (11 pixels wide) + 0x20, 0x00, // # + 0xF0, 0x00, // #### + 0x28, 0x00, // # # + 0x28, 0x00, // # # + 0x70, 0x00, // ### + 0xA0, 0x00, // # # + 0xA0, 0x00, // # # + 0xA0, 0x00, // # # + 0x78, 0x00, // #### + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + + // @120 '%' (11 pixels wide) + 0x80, 0x00, // # + 0xCC, 0x00, // ## ## + 0x52, 0x00, // # # # + 0x72, 0x00, // # ### + 0x2C, 0x00, // ## # + 0xB0, 0x01, // ## ## + 0x50, 0x02, // # # # + 0x58, 0x02, // ## # # + 0x88, 0x01, // # ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @144 '&' (11 pixels wide) + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x50, 0x00, // # # + 0x30, 0x00, // ## + 0xB8, 0x00, // ### # + 0xAC, 0x00, // ## # # + 0xC4, 0x00, // # ## + 0x44, 0x00, // # # + 0xB8, 0x00, // ### # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @168 ''' (11 pixels wide) + 0x00, 0x00, // + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @192 '(' (11 pixels wide) + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x40, 0x00, // # + 0x00, 0x00, // + + // @216 ')' (11 pixels wide) + 0x08, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + + // @240 '*' (11 pixels wide) + 0x00, 0x00, // + 0x10, 0x00, // # + 0x7C, 0x00, // ##### + 0x38, 0x00, // ### + 0x2C, 0x00, // ## # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @264 '+' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x20, 0x00, // # + 0xF8, 0x00, // ##### + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @288 ',' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @312 '-' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @336 '.' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @360 '/' (11 pixels wide) + 0x80, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @384 '0' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @408 '1' (11 pixels wide) + 0x00, 0x00, // + 0x20, 0x00, // # + 0x30, 0x00, // ## + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @432 '2' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x80, 0x00, // # + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0xF8, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @456 '3' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x80, 0x00, // # + 0x70, 0x00, // ### + 0x80, 0x00, // # + 0x80, 0x00, // # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 '4' (11 pixels wide) + 0x00, 0x00, // + 0x40, 0x00, // # + 0x60, 0x00, // ## + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x48, 0x00, // # # + 0xFC, 0x00, // ###### + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @504 '5' (11 pixels wide) + 0x00, 0x00, // + 0xF8, 0x00, // ##### + 0x08, 0x00, // # + 0x78, 0x00, // #### + 0x88, 0x00, // # # + 0x80, 0x00, // # + 0x80, 0x00, // # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @528 '6' (11 pixels wide) + 0x00, 0x00, // + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x78, 0x00, // #### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @552 '7' (11 pixels wide) + 0x00, 0x00, // + 0xFC, 0x00, // ###### + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @576 '8' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @600 '9' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0xF0, 0x00, // #### + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @624 ':' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @648 ';' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @672 '<' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @696 '=' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xF0, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0xF0, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @720 '>' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x08, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @744 '?' (11 pixels wide) + 0x00, 0x00, // + 0x78, 0x00, // #### + 0x80, 0x00, // # + 0x80, 0x00, // # + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @768 '@' (11 pixels wide) + 0xF8, 0x00, // ##### + 0x04, 0x01, // # # + 0x72, 0x02, // # ### # + 0xDA, 0x02, // # ## ## # + 0xCA, 0x02, // # # ## # + 0xB2, 0x01, // # ## ## + 0x02, 0x00, // # + 0x04, 0x01, // # # + 0xF8, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @792 'A' (11 pixels wide) + 0x00, 0x00, // + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x50, 0x00, // # # + 0x48, 0x00, // # # + 0x78, 0x00, // #### + 0x44, 0x00, // # # + 0x84, 0x00, // # # + 0x82, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @816 'B' (11 pixels wide) + 0x00, 0x00, // + 0x78, 0x00, // #### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x48, 0x00, // # # + 0x78, 0x00, // #### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @840 'C' (11 pixels wide) + 0x00, 0x00, // + 0xE0, 0x00, // ### + 0x90, 0x00, // # # + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x84, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @864 'D' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x34, 0x00, // # ## + 0x44, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x44, 0x00, // # # + 0x3C, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @888 'E' (11 pixels wide) + 0x00, 0x00, // + 0xF8, 0x00, // ##### + 0x08, 0x00, // # + 0x08, 0x00, // # + 0xF8, 0x00, // ##### + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0xF8, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @912 'F' (11 pixels wide) + 0x00, 0x00, // + 0xF0, 0x01, // ##### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0xF0, 0x00, // #### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @936 'G' (11 pixels wide) + 0x00, 0x00, // + 0xE0, 0x00, // ### + 0x10, 0x01, // # # + 0x08, 0x00, // # + 0x04, 0x00, // # + 0xF4, 0x01, // # ##### + 0x04, 0x01, // # # + 0x84, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 'H' (11 pixels wide) + 0x00, 0x00, // + 0x08, 0x01, // # # + 0x08, 0x01, // # # + 0x08, 0x01, // # # + 0xF8, 0x01, // ###### + 0x08, 0x01, // # # + 0x08, 0x01, // # # + 0x08, 0x01, // # # + 0x08, 0x01, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @984 'I' (11 pixels wide) + 0x00, 0x00, // + 0x7C, 0x00, // ##### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1008 'J' (11 pixels wide) + 0x00, 0x00, // + 0xF0, 0x01, // ##### + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1032 'K' (11 pixels wide) + 0x00, 0x00, // + 0x88, 0x00, // # # + 0x48, 0x00, // # # + 0x28, 0x00, // # # + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x28, 0x00, // # # + 0x48, 0x00, // # # + 0x88, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1056 'L' (11 pixels wide) + 0x00, 0x00, // + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1080 'M' (11 pixels wide) + 0x00, 0x00, // + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0xAA, 0x00, // # # # # + 0xAA, 0x00, // # # # # + 0xAA, 0x00, // # # # # + 0x11, 0x01, // # # # + 0x11, 0x01, // # # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1104 'N' (11 pixels wide) + 0x00, 0x00, // + 0x04, 0x01, // # # + 0x0C, 0x01, // ## # + 0x14, 0x01, // # # # + 0x14, 0x01, // # # # + 0x24, 0x01, // # # # + 0x44, 0x01, // # # # + 0x84, 0x01, // # ## + 0x04, 0x01, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1128 'O' (11 pixels wide) + 0x00, 0x00, // + 0xF0, 0x00, // #### + 0x08, 0x01, // # # + 0x04, 0x01, // # # + 0x04, 0x01, // # # + 0x04, 0x01, // # # + 0x04, 0x01, // # # + 0x84, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1152 'P' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x90, 0x00, // # # + 0x90, 0x00, // # # + 0x90, 0x00, // # # + 0x90, 0x00, // # # + 0x70, 0x00, // ### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1176 'Q' (11 pixels wide) + 0x00, 0x00, // + 0xF0, 0x00, // #### + 0x08, 0x01, // # # + 0x04, 0x02, // # # + 0x04, 0x02, // # # + 0x04, 0x02, // # # + 0x24, 0x02, // # # # + 0x48, 0x01, // # # # + 0xF0, 0x01, // ##### + 0x00, 0x03, // ## + 0x00, 0x02, // # + 0x00, 0x00, // + + // @1200 'R' (11 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x48, 0x00, // # # + 0x48, 0x00, // # # + 0x48, 0x00, // # # + 0x38, 0x00, // ### + 0x28, 0x00, // # # + 0x48, 0x00, // # # + 0x88, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1224 'S' (11 pixels wide) + 0x00, 0x00, // + 0xE0, 0x01, // #### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0xE0, 0x00, // ### + 0x00, 0x01, // # + 0x00, 0x01, // # + 0x08, 0x01, // # # + 0xF0, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1248 'T' (11 pixels wide) + 0x00, 0x00, // + 0xFC, 0x01, // ####### + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1272 'U' (11 pixels wide) + 0x00, 0x00, // + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x84, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1296 'V' (11 pixels wide) + 0x00, 0x00, // + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1320 'W' (11 pixels wide) + 0x00, 0x00, // + 0x21, 0x04, // # # # + 0x21, 0x04, // # # # + 0x52, 0x02, // # # # # + 0x52, 0x02, // # # # # + 0x4A, 0x01, // # # # # + 0x4A, 0x01, // # # # # + 0x44, 0x01, // # # # + 0x84, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1344 'X' (11 pixels wide) + 0x00, 0x00, // + 0x82, 0x00, // # # + 0x44, 0x00, // # # + 0x28, 0x00, // # # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x28, 0x00, // # # + 0x44, 0x00, // # # + 0x82, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1368 'Y' (11 pixels wide) + 0x00, 0x00, // + 0x84, 0x00, // # # + 0x48, 0x00, // # # + 0x48, 0x00, // # # + 0x50, 0x00, // # # + 0x30, 0x00, // ## + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1392 'Z' (11 pixels wide) + 0x00, 0x00, // + 0xFC, 0x01, // ####### + 0x80, 0x00, // # + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x04, 0x00, // # + 0xFC, 0x01, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1416 '[' (11 pixels wide) + 0x70, 0x00, // ### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x70, 0x00, // ### + 0x00, 0x00, // + + // @1440 '\' (11 pixels wide) + 0x00, 0x00, // + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x40, 0x00, // # + 0x40, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @1464 ']' (11 pixels wide) + 0x38, 0x00, // ### + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x38, 0x00, // ### + 0x00, 0x00, // + + // @1488 '^' (11 pixels wide) + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x48, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1512 '_' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFC, 0x01, // ####### + 0x00, 0x00, // + + // @1536 '`' (11 pixels wide) + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1560 'a' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0x00, // ### + 0x90, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x01, // ### # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1584 'b' (11 pixels wide) + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x78, 0x00, // #### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1608 'c' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x90, 0x00, // # # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1632 'd' (11 pixels wide) + 0x80, 0x00, // # + 0x80, 0x00, // # + 0x80, 0x00, // # + 0xF0, 0x00, // #### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0xF0, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1656 'e' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x44, 0x00, // # # + 0x24, 0x00, // # # + 0x1C, 0x00, // ### + 0x44, 0x00, // # # + 0x38, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1680 'f' (11 pixels wide) + 0xC0, 0x00, // ## + 0x20, 0x00, // # + 0x20, 0x00, // # + 0xF8, 0x00, // ##### + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1704 'g' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x30, 0x00, // ## + 0x48, 0x00, // # # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x78, 0x00, // #### + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x1C, 0x00, // ### + + // @1728 'h' (11 pixels wide) + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x68, 0x00, // # ## + 0x98, 0x00, // ## # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1752 'i' (11 pixels wide) + 0x00, 0x00, // + 0x20, 0x00, // # + 0x00, 0x00, // + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1776 'j' (11 pixels wide) + 0x00, 0x00, // + 0x10, 0x00, // # + 0x00, 0x00, // + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x12, 0x00, // # # + 0x0C, 0x00, // ## + + // @1800 'k' (11 pixels wide) + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x44, 0x00, // # # + 0x24, 0x00, // # # + 0x14, 0x00, // # # + 0x1C, 0x00, // ### + 0x24, 0x00, // # # + 0x44, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1824 'l' (11 pixels wide) + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1848 'm' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x94, 0x00, // # # # + 0x6C, 0x01, // ## ## # + 0x24, 0x01, // # # # + 0x24, 0x01, // # # # + 0x24, 0x01, // # # # + 0x24, 0x01, // # # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1872 'n' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x68, 0x00, // # ## + 0x98, 0x00, // ## # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1896 'o' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x70, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 'p' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0x00, // #### + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x44, 0x00, // # # + 0x3C, 0x00, // #### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + + // @1944 'q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0x00, // ### + 0x90, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0xF0, 0x00, // #### + 0x80, 0x00, // # + 0x80, 0x00, // # + 0x80, 0x00, // # + + // @1968 'r' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x50, 0x00, // # # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1992 's' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x08, 0x00, // # + 0x10, 0x00, // # + 0x20, 0x00, // # + 0x40, 0x00, // # + 0x38, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2016 't' (11 pixels wide) + 0x00, 0x00, // + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x38, 0x00, // ### + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2040 'u' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0xF0, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2064 'v' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x88, 0x00, // # # + 0x88, 0x00, // # # + 0x50, 0x00, // # # + 0x50, 0x00, // # # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2088 'w' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x24, 0x01, // # # # + 0x24, 0x01, // # # # + 0xB4, 0x00, // # ## # + 0xB4, 0x00, // # ## # + 0xA8, 0x00, // # # # + 0x48, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2112 'x' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x84, 0x00, // # # + 0x48, 0x00, // # # + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x48, 0x00, // # # + 0x84, 0x00, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2136 'y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x08, 0x01, // # # + 0x88, 0x00, // # # + 0x90, 0x00, // # # + 0x50, 0x00, // # # + 0x60, 0x00, // ## + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + + // @2160 'z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0x00, // #### + 0x40, 0x00, // # + 0x20, 0x00, // # + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x78, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2184 '{' (11 pixels wide) + 0x60, 0x00, // ## + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x18, 0x00, // ## + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x10, 0x00, // # + 0x60, 0x00, // ## + 0x00, 0x00, // + + // @2208 '|' (11 pixels wide) + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x00, 0x00, // + + // @2232 '}' (11 pixels wide) + 0x18, 0x00, // ## + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x60, 0x00, // ## + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x20, 0x00, // # + 0x18, 0x00, // ## + 0x00, 0x00, // + + // @2256 '~' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x98, 0x00, // ## # + 0x9C, 0x00, // ### # + 0x64, 0x00, // # ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + + + sFONT ComicSansMS_18 = { .table = ComicSansMS_18_TBL, .Width = 16, @@ -616,6 +1953,15 @@ sFONT ComicSansMS_24 = { .bytesPerLine = 3 }; +sFONT ComicSansMS_8 = { + .table = comicSansMS_8ptBitmaps, + .Width = 11, + .Height = 12, + .bytesPerLine = 2 +}; + + + const uint8_t Monk_TBL[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEE,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xAF,0xFB,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xDF,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xEF,0xFF,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,0xF8,0x07,0x00,0x00,0x00,0x00,0x00,0xB0,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0xFE,0x3F,0x00,0x00,0x00,0x00,0x00,0xF0,0xDF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0xAF,0xFA,0x00,0x00,0x00,0x00,0x00,0x70,0x7F,0xFB,0x07,0x00,0x00,0x00,0x00,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0xE0,0xDF,0xFE,0x03,0x00,0x00,0x00,0x00,0x80,0x6F,0xFD,0x01,0x00,0x00,0x00,0x00,0xA0,0xFF,0xDE,0x01,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x03,0x00,0x00,0x00,0x00,0xC0,0xBF,0xF5,0x03,0x00,0x00,0x00,0x00,0x80,0xFF,0xFD,0x03,0x00,0x00,0x00,0x00,0xC0,0x7F,0xFD,0x01,0x00,0x00,0x00,0x00,0x80,0xB5,0xFF,0x03,0x00,0x00,0x00,0x00,0xC0,0x5F,0xDB,0x01,0x00,0x00,0x00,0x00,0xC0,0xED,0xFF,0x03,0x00,0x00,0x00,0x00,0xC0,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0xE0,0xAA,0xFF,0x03,0x00,0x00,0x00,0x00,0x40,0xBF,0xFA,0x01,0x00,0x00,0x00,0x00,0xE0,0xF6,0xFF,0x07,0x00,0x00,0x00,0x00,0x60,0xBE,0xFB,0x01,0x00,0x00,0x00,0x00,0xF0,0xBA,0xFF,0x03,0x00,0x00,0x00,0x00,0x70,0xBC,0xEE,0x00,0x00,0x00,0x00,0x00,0xF0,0xF6,0xFF,0x07,0x00,0x00,0x00,0x00,0x7C,0x75,0xBD,0x00,0x00,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x1F,0x00,0x3C,0x00,0x00,0xF0,0xFF,0x07,0xC0,0xFF,0x7F,0x00,0x00,0x80,0xFF,0xFF,0x1F,0x00,0x00,0x00,0x00,0xF0,0xDD,0x0E,0x80,0xFF,0x7F,0x00,0x00,0x00,0xFE,0xFF,0x3B,0x00,0x00,0x00,0x00,0x50,0xE0,0x03,0xF0,0xFF,0x7F,0x00,0x00,0x00,0x80,0xFF,0x2E,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0xF8,0xFF,0x3F,0x00,0x00,0x00,0x00,0x1A,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xEC,0x55,0x0F,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0xD2,0x05,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 diff --git a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c --- a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c +++ b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal.c @@ -26,63 +26,104 @@ #include #include -int __line__ =0; -int __column__=0; -int __lineCount__=0; -int __columnCount__=0; -LCD_t* __LCD__=NULL; -sFONT* __font__; +#define CHARXPOS(terminal,charwidth) (((terminal)->column * charwidth) + (terminal)->Xpos) +#define CHARYPOS(terminal,charheight) ((terminal)->line * charheight + (terminal)->Ypos+charheight) -int __verticalSpace__=2; -int __horizontalSpace__=0; -int __verticalMargins__=5; -int __horizontalMargins__=5; - -#define CHARXPOS(charwidth) ((__column__*charwidth)+__horizontalMargins__) -#define CHARYPOS(charheight) ((__line__*charheight)+__verticalMargins__+charheight) +streamdevice_ops TERMINAL_OPS= +{ + .write = &terminal_write, + .read = &terminal_read, + .setpos= &terminal_setpos, + .close = NULL +}; -#define charwidth (__font__->Width+__horizontalSpace__) -#define charheight (__font__->Height+__verticalSpace__) - -int terminal_init(LCD_t* LCD,sFONT* font,streamdevice* strdev) +int terminal_init(terminal_t* terminal,LCD_t* LCD,sFONT* font,streamdevice* strdev) { - if((LCD!=NULL) && (font!=NULL) && (strdev!=NULL)) + if((LCD!=NULL) && (font!=NULL) && (strdev!=NULL) && (terminal!=NULL)) { - __LCD__=LCD; - __font__=font; - __lineCount__ = (LCD->height - (__verticalMargins__*2))/charheight; - __columnCount__ = ((LCD->width - (__horizontalMargins__*2))/charwidth)-1; + terminal->LCD=LCD; + terminal->font=font; + terminal->line = 0; + terminal->column = 0; + terminal->horizontalSpace=-2; + terminal->verticalSpace=2; + int charw=terminal->font->Width + terminal->horizontalSpace; + int charh=terminal->font->Height + terminal->verticalSpace; + terminal->textColor=0xFFFF; + terminal->backgroundColor=0x0000; + terminal_setgeometry(terminal,5,5,terminal->LCD->width-(10),terminal->LCD->height-(10)); - strdev->_stream = (UHANDLE)__LCD__; - strdev->write = (write_t)&terminal_write; - strdev->read = (read_t)&terminal_read; - strdev->setpos = (setpos_t)&terminal_setpos; + strdev->_stream = (UHANDLE)terminal; + strdev->ops = &TERMINAL_OPS; strdev->streamPt = 0; - __line__ = 0; - __column__ = 0; - __LCD__->paintFilRect(__LCD__,CHARXPOS(charwidth),CHARYPOS(charheight)-charheight,charwidth,charheight,0x0000,0,0x0000); + terminal_clear(terminal); + terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal, charw),CHARYPOS(terminal, charh)-charh,charw,charh,terminal->backgroundColor,0,terminal->backgroundColor); return 1; } return 0; } -void terminal_movecursor(int n) +void terminal_setgeometry(terminal_t* terminal,uint16_t Xpos,uint16_t Ypos,uint16_t width,uint16_t height) { - __column__ += n; - if(__column__>__columnCount__) - { - __line__ += (__column__)/__columnCount__; - __LCD__->paintFilRect(__LCD__,CHARXPOS(charwidth),CHARYPOS(charheight)-charheight,charwidth*(__columnCount__-__column__),charheight,0x0000,0,0x0000); - __line__ = __line__ % __lineCount__; - __column__ = __column__ % __columnCount__; - } - __LCD__->paintFilRect(__LCD__,CHARXPOS(charwidth),CHARYPOS(charheight)-charheight,charwidth,charheight,0x0000,0,0x0000); + int charw=terminal->font->Width + terminal->horizontalSpace; + int charh=terminal->font->Height + terminal->verticalSpace; + if(terminal->LCD->height<(Ypos+height)) + return; + if(terminal->LCD->width<(Xpos+width)) + return; + terminal->Xpos = Xpos; + terminal->Ypos = Ypos; + terminal->height = height; + terminal->width = width; + terminal->lineCount = terminal->height/charh; + terminal->columnCount = (terminal->width/charw)-1; + terminal_clear(terminal); +} + +void terminal_clear(terminal_t* terminal) +{ + terminal->LCD->paintFilRect(terminal->LCD,terminal->Xpos,terminal->Ypos,terminal->width,terminal->height,terminal->backgroundColor,0,terminal->backgroundColor); +} + +void terminal_setbackgroundColor(terminal_t* terminal, uint32_t backgrooundColor) +{ + terminal->backgroundColor = backgrooundColor; } -int terminal_writenc(char* data, int n) +void terminal_settextColor(terminal_t* terminal, uint32_t textColor) +{ + terminal->textColor = textColor; +} + + +void terminal_movecursor(terminal_t* terminal,int n) { + int charw=terminal->font->Width + terminal->horizontalSpace; + int charh=terminal->font->Height + terminal->verticalSpace; + terminal->column += n; + if(terminal->column>terminal->columnCount) + { + terminal->line += (terminal->column)/terminal->columnCount; + terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal, charw),CHARYPOS(terminal,charh)-charh,charw*(terminal->columnCount-terminal->column),charh,terminal->backgroundColor,0,terminal->backgroundColor); + terminal->line = terminal->line % terminal->lineCount; + terminal->column = terminal->column % terminal->columnCount; + } + terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal,charw),CHARYPOS(terminal,charh)-charh,charw,charh,terminal->backgroundColor,0,terminal->backgroundColor); +} + +void terminal_clearCurentLine(terminal_t* terminal) +{ + int charw=terminal->font->Width + terminal->horizontalSpace; + int charh=terminal->font->Height + terminal->verticalSpace; + terminal->LCD->paintFilRect(terminal->LCD,terminal->Xpos,CHARYPOS(terminal, charh)-charh,terminal->width,charh,terminal->backgroundColor,0,terminal->backgroundColor); +} + +int terminal_writenc(terminal_t* terminal,char* data, int n) +{ + int charw=terminal->font->Width + terminal->horizontalSpace; + int charh=terminal->font->Height + terminal->verticalSpace; int l=0; char buffer[2]=" "; while(lline= (terminal->line+1) % terminal->lineCount; + terminal->column = 0; }else { if(buffer[0]=='\t') { - __line__ += (__column__+3) / __columnCount__; - __column__= (__column__+3) % __columnCount__; - }else { - __LCD__->paintFilRect(__LCD__,CHARXPOS(charwidth),CHARYPOS(charheight)-charheight,charwidth,charheight,0x0000,0,0x0000); - __LCD__->paintText(__LCD__,buffer,CHARXPOS(charwidth),CHARYPOS(charheight),__font__,0xFFFF); - terminal_movecursor(1); - } + for(int i=0;i<1;i++)terminal_movecursor(terminal,1); + }else + if(terminal->column==0)terminal_clearCurentLine(terminal); + if(buffer[0]!='\r'){ + terminal->LCD->paintFilRect(terminal->LCD,CHARXPOS(terminal,charw),CHARYPOS(terminal, charh)-charh,charw,charh,terminal->backgroundColor,0,terminal->backgroundColor); + terminal->LCD->paintText(terminal->LCD,buffer,CHARXPOS(terminal,charw),CHARYPOS(terminal, charh),terminal->font,terminal->textColor); + terminal_movecursor(terminal,1); + } } l++; } return n; } -int terminal_write(streamdeviceptr device,void* data,int size, int n) +int terminal_write(streamdevice* device,void* data,int size, int n) { - return terminal_writenc((char*) data,size*n); + return terminal_writenc((terminal_t*)device->_stream,(char*) data,size*n); } -int terminal_read(streamdeviceptr device,void* data,int size, int n) +int terminal_read(streamdevice* device,void* data,int size, int n) { return n*size; } -int terminal_setpos(streamdeviceptr device,int pos) +int terminal_setpos(streamdevice* device,int pos) { return 1; } -int terminal_close(streamdeviceptr device) +int terminal_close( streamdevice* device) { return 1; } diff --git a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal_STM32F4.pro b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal_STM32F4.pro --- a/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal_STM32F4.pro +++ b/lib/src/common/GRAPHIC/GUI/Widgets/Terminal/Terminal_STM32F4.pro @@ -13,7 +13,8 @@ INCLUDEPATH += ../../../../includes \ ../../../../includes/GRAPHIC/GUI/FONTS \ ../../../../includes/GRAPHIC/GUI/Widgets - +HEADERS += \ + ../../../../../includes/GRAPHIC/GUI/Widgets/terminal.h UCMODEL=stm32f4 diff --git a/lib/src/common/Threading/Threading.pro b/lib/src/common/Threading/Threading.pro new file mode 100644 --- /dev/null +++ b/lib/src/common/Threading/Threading.pro @@ -0,0 +1,14 @@ +TEMPLATE = lib +OBJECTS_DIR = obj + +SOURCES += thread.c + +INCLUDEPATH += ../../includes \ + ../CPU/STM32F4xx_StdPeriph_Driver/inc \ + ../CPU/CMSIS/Include + + +UCMODEL=stm32f4 + +target.path = $$[QT_INSTALL_LIBS]/$$UCMODEL +INSTALLS += target diff --git a/lib/src/common/Threading/thread.c b/lib/src/common/Threading/thread.c new file mode 100644 --- /dev/null +++ b/lib/src/common/Threading/thread.c @@ -0,0 +1,41 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2013, Alexis Jeandet +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@gmail.com +-------------------------------------------------------------------------------*/ + +#include + + +int threadcreate(thread_t *thread, void *stack, int stackSize) +{ + return 0; +} + + +int threadstart(thread_t *thread) +{ + return 0; +} + + +int threadstop(thread_t *thread) +{ + return 0; +} diff --git a/lib/src/common/common.pro b/lib/src/common/common.pro --- a/lib/src/common/common.pro +++ b/lib/src/common/common.pro @@ -3,7 +3,8 @@ TEMPLATE = subdirs SUBDIRS += FILE_SYSTEM \ AUDIO \ POWER \ - GRAPHIC + GRAPHIC \ + Threading diff --git a/lib/src/includes/GRAPHIC/GUI/FONTS/fonts.h b/lib/src/includes/GRAPHIC/GUI/FONTS/fonts.h --- a/lib/src/includes/GRAPHIC/GUI/FONTS/fonts.h +++ b/lib/src/includes/GRAPHIC/GUI/FONTS/fonts.h @@ -40,6 +40,7 @@ typedef struct _tFont extern sFONT ComicSansMS_24; extern sFONT ComicSansMS_18; +extern sFONT ComicSansMS_8; extern sFONT Monk_24; #ifdef __cplusplus diff --git a/lib/src/includes/GRAPHIC/GUI/Widgets/terminal.h b/lib/src/includes/GRAPHIC/GUI/Widgets/terminal.h --- a/lib/src/includes/GRAPHIC/GUI/Widgets/terminal.h +++ b/lib/src/includes/GRAPHIC/GUI/Widgets/terminal.h @@ -27,12 +27,35 @@ #include #include -int terminal_init(LCD_t* LCD,sFONT* font,streamdevice* strdev); -void terminal_movecursor(int n); -int terminal_write(streamdeviceptr device,void* data,int size, int n); -int terminal_read(streamdeviceptr device,void* data,int size, int n); -int terminal_setpos(streamdeviceptr device,int pos); -int terminal_close(streamdeviceptr device); +typedef struct terminal_t +{ + uint16_t line; + uint16_t column; + uint16_t lineCount; + uint16_t columnCount; + uint16_t Xpos; + uint16_t Ypos; + uint16_t width; + uint16_t height; + uint32_t backgroundColor; + uint32_t textColor; + int8_t verticalSpace; + int8_t horizontalSpace; + LCD_t* LCD; + sFONT* font; +}terminal_t; + +int terminal_init(terminal_t* terminal,LCD_t* LCD,sFONT* font,streamdevice* strdev); +void terminal_setgeometry(terminal_t* terminal,uint16_t Xpos,uint16_t Ypos,uint16_t width,uint16_t height); +void terminal_clear(terminal_t* terminal); +void terminal_setbackgroundColor(terminal_t* terminal, uint32_t backgrooundColor); +void terminal_settextColor(terminal_t* terminal, uint32_t textColor); +void terminal_movecursor(terminal_t* terminal,int n); +void terminal_clearCurentLine(terminal_t* terminal); +int terminal_write(streamdevice* device,void* data,int size, int n); +int terminal_read(streamdevice* device,void* data,int size, int n); +int terminal_setpos(streamdevice* device,int pos); +int terminal_close(streamdevice* device); diff --git a/lib/src/includes/streamdevices.h b/lib/src/includes/streamdevices.h --- a/lib/src/includes/streamdevices.h +++ b/lib/src/includes/streamdevices.h @@ -14,7 +14,7 @@ -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------------- -- Author : Alexis Jeandet -- Mail : alexis.jeandet@gmail.com @@ -25,22 +25,34 @@ #include typedef struct streamdevice* streamdeviceptr; +struct streamdevice_ops; + +typedef volatile struct streamdevice +{ + struct streamdevice_ops* ops; + volatile uint32_t streamPt; + volatile UHANDLE _stream; + volatile uint32_t mode; +}streamdevice; + + +typedef struct streamdevice_ops +{ + int (*write)(streamdevice* device,void* data,int size, int n); + int (*read)(streamdevice* device,void* data,int size, int n); + int (*setpos)(streamdevice* device,int pos); + int (*close)(streamdevice* device); +}streamdevice_ops; + + typedef int (*write_t)(streamdeviceptr device,void* data,int size, int n); typedef int (*read_t)(streamdeviceptr device,void* data,int size, int n); typedef int (*setpos_t)(streamdeviceptr device,int pos); typedef int (*close_t)(streamdeviceptr device); -typedef volatile struct streamdevice -{ - write_t write; - read_t read; - setpos_t setpos; - close_t close; - volatile uint32_t streamPt; - volatile UHANDLE _stream; - volatile uint32_t mode; -}streamdevice; + + #endif diff --git a/lib/src/includes/thread.h b/lib/src/includes/thread.h new file mode 100644 --- /dev/null +++ b/lib/src/includes/thread.h @@ -0,0 +1,62 @@ +/*------------------------------------------------------------------------------ +-- This file is a part of the libuc, microcontroler library +-- Copyright (C) 2013, Alexis Jeandet +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +------------------------------------------------------------------------------- +-- Author : Alexis Jeandet +-- Mail : alexis.jeandet@gmail.com +-------------------------------------------------------------------------------*/ +#ifndef THREAD_H +#define THREAD_H +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct thread_t +{ + int (*func)(void*); + void* __stack__; + int __stackSize__; + int __stackPointer__; + int __programcounter__; +}thread_t; + + +int threadcreate(thread_t* thread,void* stack,int stackSize); +int threadstart(thread_t* thread); +int threadstop(thread_t* thread); + + +#ifdef __cplusplus +} +#endif +#endif //THREAD_H + + + + + + + + + + + + diff --git a/lib/src/stm32f4/CORE/core.c b/lib/src/stm32f4/CORE/core.c --- a/lib/src/stm32f4/CORE/core.c +++ b/lib/src/stm32f4/CORE/core.c @@ -263,7 +263,7 @@ int setPll(uint32_t freq) FLASH->ACR |= FLASH_ACR_LATENCY_7WS; RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));//Switch to PLL as main clk source RCC->CFGR |= RCC_CFGR_SW_PLL; - /* Wait till the main PLL is used as system clock source */ + /* Wait untill the main PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); if(srcfreq>150000000) { diff --git a/lib/src/stm32f4/CPU/syscalls.c b/lib/src/stm32f4/CPU/syscalls.c --- a/lib/src/stm32f4/CPU/syscalls.c +++ b/lib/src/stm32f4/CPU/syscalls.c @@ -36,7 +36,7 @@ int _close(int file) { if(file<__max_opened_files__ && __opnfiles__[file]!=NULL) { - return __opnfiles__[file]->close((streamdeviceptr) __opnfiles__[file]); + return __opnfiles__[file]->ops->close( __opnfiles__[file]); } return 0; } @@ -46,7 +46,7 @@ int _write(int file, char *ptr, int len) { if(file<__max_opened_files__ && __opnfiles__[file]!=NULL) { - if(__opnfiles__[file]->write((streamdeviceptr)__opnfiles__[file],ptr,1,len)) return len; + if(__opnfiles__[file]->ops->write(__opnfiles__[file],ptr,1,len)) return len; } return 0; } @@ -107,7 +107,7 @@ int _open(const char *name, int flags, i { uartmkstreamdev(uart,fd1); int i=2; - while(i<__max_opened_files__ && __opnfiles__[i]!=NULL)i++; + while((i<__max_opened_files__) && (__opnfiles__[i]!=NULL))i++; if(i!=__max_opened_files__) { __opnfiles__[i] = fd1; @@ -122,7 +122,7 @@ int _open(const char *name, int flags, i int _read(int file, char *ptr, int len) { if(file<__max_opened_files__ && __opnfiles__[file]!=NULL) { - if(__opnfiles__[file]->read((streamdeviceptr)__opnfiles__[file],ptr,1,len)) return len; + if(__opnfiles__[file]->ops->read(__opnfiles__[file],ptr,1,len)) return len; } return 0; } diff --git a/lib/src/stm32f4/UART/uart.c b/lib/src/stm32f4/UART/uart.c --- a/lib/src/stm32f4/UART/uart.c +++ b/lib/src/stm32f4/UART/uart.c @@ -25,12 +25,26 @@ #include #include #include +#include + #define GPIOGETPORT(gpio) ((GPIO_TypeDef*)(((((uint32_t)gpio) & (uint32_t)0x0000FF00)*(uint32_t)4) + (uint32_t)GPIOA)) #define GPIOPORTNUM(gpio) (((uint32_t)(gpio) & (uint32_t)0x0000FF00)>>(uint32_t)8) USART_TypeDef* _uart_dev_table[6]={USART1,USART2,USART3,UART4,UART5,USART6}; +int _uartstrsetpos(streamdevice* device,int pos); +int _uartstrread(streamdevice* device,void* data,int size, int n); +int _uartstrwrite(streamdevice* device,void* data,int size, int n); + +streamdevice_ops UART_OPS= +{ + .write = &_uartstrwrite, + .read = &_uartstrread, + .setpos= &_uartstrsetpos, + .close = NULL +}; + uart_t uartopen(int count) { @@ -435,10 +449,11 @@ int _uartstrsetpos(streamdevice* device, int uartmkstreamdev(uart_t uart,streamdevice* strdev) { - strdev->_stream = (UHANDLE)uart; + strdev->_stream = (UHANDLE)uart;/* strdev->write = (write_t)&_uartstrwrite; strdev->read = (read_t)&_uartstrread; - strdev->setpos = (setpos_t)&_uartstrsetpos; + strdev->setpos = (setpos_t)&_uartstrsetpos;*/ + strdev->ops = &UART_OPS; strdev->streamPt = 0; return 1; }