cauqleuir madre
Dependencies: SDFileSystem mbed TFTLCD
main.cpp
- Committer:
- Danton
- Date:
- 2013-02-01
- Revision:
- 4:06966d819846
- Parent:
- 3:4a9643fb389c
- Child:
- 5:90c04edc05d4
File content as of revision 4:06966d819846:
#include "mbed.h" #include "SDFileSystem.h" #include "hx8340bs.h" SDFileSystem sd(p11, p12, p13, p8, "sd"); // the pinout on the mbed Cool Components workshop board int main() { printf("Hello Stinky World!\c\n"); //mkdir("/sd/mydir", 0777); unsigned char bitmap[116215]; int i=0; FILE *fp = fopen("/sd/mydir/rose.bmp", "r"); unsigned char *aux=(unsigned char*)fp; if(fp == NULL) { error("Could not open file\c\n"); } //fprintf(fp, "Hello fun SD Card World!\c\n"); while(i<116215) { bitmap[i]=aux[i]; i++; } HX8340S_LCD lcd( p9, p14, p13, p11 ); lcd.Initialize(); lcd.ClearScreen(); lcd.DrawBitmap(0,0,(bitmap_t*)bitmap,1); fclose(fp); printf("Goodbye World!\c\n"); }