AnsweredAssumed Answered

MQX 3.5 bugs inside mcf5225.h

Question asked by ShinjiIkari on Feb 23, 2010
Latest reply on Mar 9, 2010 by David E Seymour

Hi,

working with MQX 3.5 when I use a pointer to a struct like VMCF5225_GPT_STRUCT_PTR or VMCF5225_RNG_STRUCT_PTR or  VMCF5225_PWM_STRUCT_PTR there is a problem. Inside the file mcf5225.h some structs are declared with mcf5225.. but after there is MCF5225 in uppercase. 

 

typedef struct mcf5225_gpt_struct
{  
   uchar    GPTIOS;         // GPT IC/OC Select Register
.......

   uchar    filler[0xFFE0];
} MCF5225_GPT_STRUCT, _PTR_ MCF5225_GPT_STRUCT_PTR;
typedef volatile struct MCF5225_gpt_struct _PTR_ VMCF5225_GPT_STRUCT_PTR; // <-- here MCF5225 is uppercase

 

 

typedef struct mcf5225_rng_struct
{
   uint_32  RNGCR;            // Random Number Generator Control Register
...
   uint_32  RNGOUT;           // Random Number Generator Output Register
   uchar    filler[0xFFEC];
} MCF5225_RNG_STRUCT, _PTR_ MCF5225_RNG_STRUCT_PTR;
typedef volatile struct MCF5225_rng_struct _PTR_ VMCF5225_RNG_STRUCT_PTR; // <-- here MCF5225 is uppercase

 

typedef struct mcf5225_pwm_struct
{  
   uchar    PWME;            // PWM Enable Register
 ...
   uchar    PWMSDN;          // PWM Shutdown Register
   uchar    filler[0xFFDB];  
} MCF5225_PWM_STRUCT, _PTR_ MCF5225_PWM_STRUCT_PTR;
typedef volatile struct MCF5225_pwm_struct _PTR_ VMCF5225_PWM_STRUCT_PTR; // <-- here MCF5225 is uppercase

Outcomes