-
想通过初始化GPIO口采集外部电平信号但总是初始化不成功。
Sysctrl_SetPeripheralGate(SysctrlPeripheralGpio,TRUE);//timerstc_gpio_cfg_tstcGpioCfg;stcGpioCfg.enDir=GpioDirIn;stcGpioCfg.enPu=GpioPuEnable;stcGpioCfg.enCtrlMode=GpioAHB;Gpio_Init(GpioPortB,GpioPin6,&stcGpioCfg);while(1){rev_len=DevUART_Read(&gDebugUart,recv_buf,MEM_POOL_BLOCK_SIZE,OS_ALWAYS_DELAY);uint8_tdian;//unsignedchar*G;uint8_t*G;dian=Gpio_GetInputIO(GpioPortB,GpioPin6);sprintf(G,"%d",dian);AT_TxFreq(0,G,rev_len);gEnableRadioRx=true;osDelayMs(10);
2021-03-23 0