affichage VGA
Dependencies: mbed fastlib vga640x400
main.c
- Committer:
- clementlignie
- Date:
- 2019-06-12
- Revision:
- 1:8229db8e7d08
- Parent:
- 0:043bbfc55ea1
File content as of revision 1:8229db8e7d08:
#include "mbed.h" #include "vga640x400/vga640x400.h" Serial pc(USBTX, USBRX); // tx, rx extern unsigned char font_lin[256*16]; int main() { font = font_lin; char phrase[] = "Bonjour, je m'appelle clement, j'habite a Bondoufle et j'aime bricoler. je mange du poulet, du riz et du fromage"; //char phrase[] = "Bonjour, jean-mich"; //char bufferPrase1 [] = ""; int longueurPhrase = 0; //ATTENTION +1 car carractère de fin longueurPhrase = sizeof(phrase); pc.printf("AZERTY\n\r"); pc.printf("%d\n\r", longueurPhrase); /*for (int i=0 ; i<sizeof(phrase); i ++) { bufferPrase1 [i] = phrase[i]; //80 caractères par lignes pc.printf("%c", bufferPrase1[i]); }*/ ////////////Affichage/////////////// // xor 1 to compensate for character order (10325476 et cetera) // moved to userspace instead of rendering loop for obvious reasons for (int i=0; i<400; i++) text_buffer[i^1] = 0xff; for (int i=0 ; i<sizeof(phrase); i ++) text_buffer[(400+i)^1] = phrase[i]; //80 caractères par lignes init_vga(); while(1); }