Hi,
I'm trying to port code written for the CROSSWORKS_ARM_COMPILER to C51 and Keil will not accept the following definition:
typedef struct _FFS_FILE { DWORD directory_entry_sector; BYTE directory_entry_within_sector; DWORD current_cluster; BYTE current_sector; WORD current_byte; DWORD current_byte_within_file; DWORD file_size; union { struct { unsigned int file_is_open :1; unsigned int read_permitted :1; unsigned int write_permitted :1; unsigned int write_append_only :1; unsigned int inc_posn_before_next_rw :1; unsigned int access_error :1; unsigned int end_of_file :1; unsigned int file_size_has_changed :1; unsigned int reserved :8; } bits; WORD word; } flags; } FFS_FILE;
I get this error: ffs.h(131): error C141: syntax error near 'DWORD' ffs.h(131): error C129: missing ';' before 'directory_entry_sector'
I'm not well versed in C and any help will be appreciated. Thanks,
John
Per,
Thank you, your suggestion worked. Apparently, Keil C51 does not have stdint.h but the definition of standard types did the trick.
Thanks again, John