1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#ifndef _FLASHLOGO_H
#define _FLASHLOGO_H
#define CMD_WRITE_DISABLE 0
#define CMD_WRITE_ENABLE 0x28
#define CMD_WRITE_BASE64K_ENABLE 0x47
#define FLASH_EACCES -100
#define FLASH_EBADSIZE -101
#define FLASH_EBADOFF -102
#define LB_SHOWGIF 1
#define LB_SHOWNW 2
#define LB_NOSOUND 0x80
#define LB_MAGIC 0x474C574E
struct logoblock
{
int magic; // should be "NWLG" (LB_MAGIC)
char flags;
short x __attribute__ ((packed));
short y __attribute__ ((packed));
unsigned short size __attribute__ ((packed));
char data[65525] __attribute__ ((packed));
};
struct logoblock2
{
int magic; // should be "NWLG" (LB_MAGIC)
char flags;
short x __attribute__ ((packed));
short y __attribute__ ((packed));
unsigned short size __attribute__ ((packed));
char data2[65525-2*1024] __attribute__ ((packed));
};
int flashsize(void);
int flashread(char *buffer, int offset, int size);
int flashwrite(char *buffer, int offset, int size);
#endif /* _FLASHLOGO_H */
|