本帖最后由 1347559641 于 2014-11-29 14:35 编辑
FSL_GPIO.zip
(548.08 KB)
各位好,我自己打算写一个驱动程序,,从做简单的LED开始啦,但是在给结构体幅值的时候就硬件错误,
HardFault_Handler\
PROC
EXPORT HardFault_Handler [WEAK]
B .
ENDP
求指点![code]
FSL_PORT_FUN *port_set;
port_set->PORT_ISF=PORT_PCR_ISF_DN;
port_set->PORT_IRQC=PORT_PCR_IRQC_IT_DMA_DIS;
port_set->PORT_LK=PORT_PCR_LK_DN;
port_set->PORT_MUX=PORT_PCR_MUX_ALT1;
port_set->PORT_DSE=PORT_PCR_DSE_HD;
port_set->PORT_ODE=PORT_PCR_ODE_DN;
port_set->PORT_PFE=PORT_PCR_PE_DN;
port_set->PORT_SRE=PORT_PCR_SRE_SL;
port_set->PORT_PE=PORT_PCR_PE_EN;
port_set->PORT_PS=PORT_PCR_PS_UP;
typedef struct
{
INT8U PORT_ISF :8 ;
INT8U PORT_IRQC:8 ;
INT8U PORT_LK :1 ;
INT8U PORT_MUX :7;
INT8U PORT_DSE :2;
INT8U PORT_ODE :1;
INT8U PORT_PFE :1;
INT8U PORT_SRE :2;
INT8U PORT_PE :1;
INT8U PORT_PS :1;
}FSL_PORT_FUN;
|