在CCS中:
typedef struct {
Uint32 gblctl;
Uint32 cectl0;
Uint32 cectl1;
Uint32 cectl2;
Uint32 cectl3;
Uint32 sdctl;
Uint32 sdtim;
Uint32 sdext;
Uint32 cesec0;
Uint32 cesec1;
Uint32 cesec2;
Uint32 cesec3;
} EMIFA_Config;
void main()
{
*GPEN = 0x000026f0 ;
*GPDIR = 0x00002600 ;
EMIFA_Config emifaCfg0 = {
0x000520C4, /* Global Control Reg. (GBLCTL) */
0x44148444, /* CE0 Space Control Reg. (CECTL0) *///0x2172c523 //0x000520A4,
0x2172c543, /* C1 Space Control Reg. (CECTL1) */
0xFFFFFF23, /* CE2 Space Control Reg. (CECTL2) */
0xFFFFFF23, /* CE3 Space Control Reg. (CECTL3) */
0x0348F000, /* SDRAM Control Reg.(SDCTL) */
0x005DC5DC, /* SDRAM Timing Reg.(SDTIM) */
0x00175F3F, /* SDRAM Extended Reg.(SDEXT) */
0x00000063, /* CE0 Space Secondary Control Reg. (CESEC0) */
0x00000063, /* CE1 Space Secondary Control Reg. (CESEC1) */ //0x00000060
0x00000002, /* CE2 Space Secondary Control Reg. (CESEC2) */
0x00000002 /* CE3 Space Secondary Control Reg. (CESEC3) */
};
}
好像是因为没有声明就开始使用EMIFA_Config这个变量了,该怎么解决呢? 大家可以集思广益!
typedef struct {
Uint32 gblctl;
Uint32 cectl0;
Uint32 cectl1;
Uint32 cectl2;
Uint32 cectl3;
Uint32 sdctl;
Uint32 sdtim;
Uint32 sdext;
Uint32 cesec0;
Uint32 cesec1;
Uint32 cesec2;
Uint32 cesec3;
} EMIFA_Config;
void main()
{
*GPEN = 0x000026f0 ;
*GPDIR = 0x00002600 ;
EMIFA_Config emifaCfg0 = {
0x000520C4, /* Global Control Reg. (GBLCTL) */
0x44148444, /* CE0 Space Control Reg. (CECTL0) *///0x2172c523 //0x000520A4,
0x2172c543, /* C1 Space Control Reg. (CECTL1) */
0xFFFFFF23, /* CE2 Space Control Reg. (CECTL2) */
0xFFFFFF23, /* CE3 Space Control Reg. (CECTL3) */
0x0348F000, /* SDRAM Control Reg.(SDCTL) */
0x005DC5DC, /* SDRAM Timing Reg.(SDTIM) */
0x00175F3F, /* SDRAM Extended Reg.(SDEXT) */
0x00000063, /* CE0 Space Secondary Control Reg. (CESEC0) */
0x00000063, /* CE1 Space Secondary Control Reg. (CESEC1) */ //0x00000060
0x00000002, /* CE2 Space Secondary Control Reg. (CESEC2) */
0x00000002 /* CE3 Space Secondary Control Reg. (CESEC3) */
};
}
好像是因为没有声明就开始使用EMIFA_Config这个变量了,该怎么解决呢? 大家可以集思广益!