cauqleuir madre
Dependencies: SDFileSystem mbed TFTLCD
main.cpp@2:e205fa129def, 2013-02-01 (annotated)
- Committer:
- Danton
- Date:
- Fri Feb 01 19:20:01 2013 +0000
- Revision:
- 2:e205fa129def
- Parent:
- 1:d6f6ac480cf1
- Child:
- 3:4a9643fb389c
rosa
Who changed what in which revision?
User | Revision | Line number | New 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 | 2:e205fa129def | 14 | FILE *fp = fopen("/sd/mydir/bitmap.bmp", "r"); |
Danton | 0:a11b3a90c259 | 15 | if(fp == NULL) { |
Danton | 2:e205fa129def | 16 | error("Could not open file\c\n"); |
Danton | 0:a11b3a90c259 | 17 | } |
Danton | 2:e205fa129def | 18 | //fprintf(fp, "Hello fun SD Card World!\c\n"); |
Danton | 2:e205fa129def | 19 | |
Danton | 2:e205fa129def | 20 | lcd.Initialize(); |
Danton | 2:e205fa129def | 21 | lcd.DrawBitmap(0,0,fp,1) |
Danton | 0:a11b3a90c259 | 22 | fclose(fp); |
Danton | 0:a11b3a90c259 | 23 | |
Danton | 0:a11b3a90c259 | 24 | printf("Goodbye World!\c\n"); |
Danton | 0:a11b3a90c259 | 25 | } |