I am getting compiler error for below given function written to read the MAC (IEEE) address of TI CC2430
( error C141: syntax error near 'code' ... & ... error C141: syntax error near ')' )
// // Keil workaround #define __code code; //IEEE MAC address in flash memory #define MAC_FLASH_ADDR (0x3FFFF-7) uint8_t IEEE_MAC[8]; void ReadMAC(void) { bspIState_t state; uint8_t fmaptmp; uint8_t i; uint8_t code *flash; BSP_ENTER_CRITICAL_SECTION(state); while (FCTL & BIT7); //wait for the flash controller to be ready fmaptmp = FMAP; FMAP = MAC_FLASH_ADDR >> 15; flash = (code uint8_t *)((MAC_FLASH_ADDR & 0xFFFF) | 0x8000); Compiler Error for(i=0; i<8; i++) { IEEE_MAC[i] = flash[7-i]; } FMAP = fmaptmp; BSP_EXIT_CRITICAL_SECTION(state); }
I am not sure where I am going wrong any help would be appreciated. Thanks in Advance