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