Marcelo Costanzo Miranda
/
ST7920_TEST_sem_lib_2
ST7920 Testes
Diff: main.cpp
- Revision:
- 2:5bcfb7105fa2
- Parent:
- 1:08481151e25e
diff -r 08481151e25e -r 5bcfb7105fa2 main.cpp --- a/main.cpp Mon Dec 14 19:10:22 2020 +0000 +++ b/main.cpp Tue Dec 15 12:27:29 2020 +0000 @@ -1,53 +1,30 @@ -/* -* ATENÇÃO ST7920_CLEAR DESATIVA O MODO GRÁFICO -* -* -*/ - #include "mbed.h" #include "ST7920.h" Serial pc(USBTX, USBRX); -int main() -{ - unsigned char texto[]={'O','l','a','!', ' ', 'S', 'T', '7', '9', '2', '0'}; +int main() +{ + unsigned char texto[11]= {'O','l','a','!', ' ', 'S', 'T', '7', '9', '2', '0'}; pc.printf("OI \n\r"); - + ST7920_Init(); - wait_ms(100); - - //ST7920_Clear(); - //wait_ms(100); - - //ST7920_SetGraphicsMode(); - //wait_ms(100); - - //ST7920_Clear(); - //wait_ms(100); - - //ST7920_SetGraphicsMode(); - - //ST7920_Clear(); - - //ST7920_DrawHorizontalLine(0, 0, 100); - //wait_ms(100); - - //ST7920_DrawVerticalLine(0, 0, 50); - //wait_ms(100); - - //ST7920_SetTextMode(); - //wait_ms(100); - - ST7920_Clear(); - //wait_ms(100); - - ST7920_DisplayString(1, 1, texto, sizeof(texto)); - //wait_ms(100); - + + ST7920_SetGraphicsMode(); + + ST7920_Clear(); + + ST7920_DrawHorizontalLine(0, 0, 30); + + ST7920_DrawVerticalLine(0, 0, 50); + + ST7920_SetTextMode(); + + ST7920_DisplayString(0, 0, texto, 11); + while(1) { - + } }