I had the same problem when I ported the FAT code from AVRLib to my
LPC2106 project. I went with the non-portable approach:
struct bootsector710 {
unsigned int bsJump:24;
unsigned char bsOEMName[8];
unsigned char bsBPB[53];
unsigned char bsExt[26];
unsigned char bsBootCode[418];
unsigned char bsBootSectSig2;
unsigned char bsBootSectSig3;
unsigned char bsBootSectSig0;
unsigned char bsBootSectSig1;
#define BOOTSIG0 0x55
#define BOOTSIG1 0xaa
#define BOOTSIG2 0
#define BOOTSIG3 0
} __attribute__ ((packed)); <=== non-portable
I didn't have the ability to change the structure - that's the way the
data is set out on the disk.
These structs are defined and accessed in a single source file. I can
live with it.
RichardMessage
Re: LPC2148 and words on odd addresses.
2006-04-29 by rtstofer
Attachments
- No local attachments were found for this message.