see https://developer.mbed.org/users/okini3939/notebook/graphic-poi/

Dependencies:   IAP RAM_DISK USBDevice mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers file.h Source File

file.h

00001 
00002 #if defined(TARGET_LPC11U24)
00003 #define DBG(...) printf("dbg: " __VA_ARGS__)
00004 #define FLASH_SECTOR 7
00005 #define MAX_SECTOR 1
00006 #elif defined(TARGET_LPC11U35_401)
00007 #define DBG(...)
00008 #define FLASH_SECTOR 8
00009 #define MAX_SECTOR 8
00010 #endif
00011 
00012 struct FatInfo {
00013     uint8_t Name[11];
00014     uint8_t Attr;
00015     uint8_t NTRes;
00016     uint8_t CrtTimeTenth;
00017     uint16_t CrtTime;
00018     uint16_t CrtDate;
00019     uint16_t LstAccDate;
00020     uint16_t FstClusHI;
00021     uint16_t WrtTime;
00022     uint16_t WrtDate;
00023     uint16_t FstClusLO;
00024     uint32_t FileSize;
00025 } __attribute__((packed));
00026 
00027 struct BmpHeader {
00028     uint8_t  magic[2];                  // Magic identifier
00029     uint32_t size;                      // File size in bytes
00030     uint16_t reserved1;     // Not used
00031     uint16_t reserved2;       // Not used
00032     uint32_t offset;                    // Offset to image data in bytes
00033     uint32_t header_size;               // Header size in bytes
00034     int32_t  width;                     // Width of the image
00035     int32_t  height;                    // Height of image
00036     uint16_t planes;                    // Number of color planes
00037     uint16_t bits;                      // Bits per pixel
00038     uint32_t compression;               // Compression type
00039     uint32_t imagesize;                 // Image size in bytes
00040     int32_t  xresolution;               // Pixels per meter
00041     int32_t  yresolution;               // Pixels per meter
00042     uint32_t ncolours;                  // Number of colors  
00043     uint32_t importantcolours;          // Important colors
00044     uint8_t  data[];
00045 } __attribute__((packed));
00046 
00047 
00048 void workMsd ();
00049 
00050 char *getPicture (int n);
00051 
00052