I am using MC9S08DZ60.h
of CodeWarrior to create a Visual Studio project. I am getting:
error C2054: expected '(' to follow '_PTDD'`.
MC9S08DZ60.h
is a header file for microcontroller MC9S08DZ60 (from Freescale Semiconductor):
typedef union {
byte Byte;
struct {
byte PTDDD0 :1; /* Data Direction for Port D Bit 0 */
byte PTDDD1 :1; /* Data Direction for Port D Bit 1 */
byte PTDDD2 :1; /* Data Direction for Port D Bit 2 */
byte PTDDD3 :1; /* Data Direction for Port D Bit 3 */
byte PTDDD4 :1; /* Data Direction for Port D Bit 4 */
byte PTDDD5 :1; /* Data Direction for Port D Bit 5 */
byte PTDDD6 :1; /* Data Direction for Port D Bit 6 */
byte PTDDD7 :1; /* Data Direction for Port D Bit 7 */
} Bits;
} PTDDDSTR;
#ifndef MXVDEV //sri
extern volatile PTDDDSTR _PTDDD @0x00000007;
#else
PTDDDSTR _PTDDD;
#endif
#define PTDDD _PTDDD.Byte
#define PTDDD_PTDDD0 _PTDDD.Bits.PTDDD0
#define PTDDD_PTDDD1 _PTDDD.Bits.PTDDD1
#define PTDDD_PTDDD2 _PTDDD.Bits.PTDDD2
#define PTDDD_PTDDD3 _PTDDD.Bits.PTDDD3
#define PTDDD_PTDDD4 _PTDDD.Bits.PTDDD4
#define PTDDD_PTDDD5 _PTDDD.Bits.PTDDD5
#define PTDDD_PTDDD6 _PTDDD.Bits.PTDDD6
#define PTDDD_PTDDD7 _PTDDD.Bits.PTDDD7
If
MXVDEV
is not defined by the preprocessor, you will have the declarationThe
@0x00000007
part is probably an extension of the CodeWarrior compiler, and it's not in the Visual Studio compiler, which means you will get an error.