//****************************************************************
//****** 连接LED指示灯 GPIO初始化函数 PA4
//****** 输入参数: 无
//****** 返回值: 无
//****************************************************************
void PhyLedGpioInit()
{
CRM->ahben_bit.gpioaen = 1; //使能GPIOA
GPIOA->cfgr_bit.iomc4 = 1; //输出模式
GPIOA->omode_bit.om4 = 1; //推挽
GPIOA->odrvr_bit.odrv4 = 1; //较大电流推动
GPIOA->pull_bit.pull4 = 0; //不上拉不下拉
}
/******************************LED****************************************/
#define LED_ON (GPIOA->odt_bit.odt4 = 0)
#define LED_OFF (GPIOA->odt_bit.odt4 = 1)
#define LED_TURN (GPIOA->idt_bit.idt4?LED_ON:LED_OFF)
void PhyLedGpioInit(void);
/*************************************************************************/