cauqleuir madre

Dependencies:   SDFileSystem mbed TFTLCD

Committer:
Danton
Date:
Fri Feb 01 20:08:36 2013 +0000
Revision:
3:4a9643fb389c
Parent:
2:e205fa129def
Child:
4:06966d819846
apuntadoes;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Danton 0:a11b3a90c259 1 #include "mbed.h"
Danton 0:a11b3a90c259 2 #include "SDFileSystem.h"
Danton 2:e205fa129def 3 #include "hx8340bs.h"
Danton 0:a11b3a90c259 4
Danton 2:e205fa129def 5 HX8340S_LCD lcd( p9, p14, p13, p11 );
Danton 2:e205fa129def 6 SDFileSystem sd(p11, p12, p13, p8, "sd"); // the pinout on the mbed Cool Components workshop board
Danton 0:a11b3a90c259 7
Danton 0:a11b3a90c259 8 int main() {
Danton 0:a11b3a90c259 9 printf("Hello Stinky World!\c\n");
Danton 2:e205fa129def 10
Danton 0:a11b3a90c259 11
Danton 2:e205fa129def 12 //mkdir("/sd/mydir", 0777);
Danton 0:a11b3a90c259 13
Danton 3:4a9643fb389c 14 unsigned char bitmap[116215];
Danton 3:4a9643fb389c 15 int i=0;
Danton 3:4a9643fb389c 16 FILE *fp = fopen("/sd/mydir/rose.bmp", "r");
Danton 3:4a9643fb389c 17 unsigned char *aux=(unsigned char*)fp;
Danton 0:a11b3a90c259 18 if(fp == NULL) {
Danton 2:e205fa129def 19 error("Could not open file\c\n");
Danton 0:a11b3a90c259 20 }
Danton 2:e205fa129def 21 //fprintf(fp, "Hello fun SD Card World!\c\n");
Danton 3:4a9643fb389c 22 while(i<116215)
Danton 3:4a9643fb389c 23 {
Danton 3:4a9643fb389c 24 bitmap[i]=aux[i];
Danton 3:4a9643fb389c 25 i++;
Danton 3:4a9643fb389c 26 }
Danton 2:e205fa129def 27
Danton 2:e205fa129def 28 lcd.Initialize();
Danton 3:4a9643fb389c 29 lcd.ClearScreen();
Danton 3:4a9643fb389c 30 lcd.DrawBitmap(0,0,(bitmap_t*)bitmap,1);
Danton 0:a11b3a90c259 31 fclose(fp);
Danton 0:a11b3a90c259 32
Danton 0:a11b3a90c259 33 printf("Goodbye World!\c\n");
Danton 0:a11b3a90c259 34 }