Sysctrl_SetPeripheralGate(SysctrlPeripheralGpio, TRUE); //timer
stc_gpio_cfg_t stcGpioCfg;
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_t dian;
//unsigned char *G;
uint8_t *G;
dian=Gpio_GetInputIO(GpioPortB,GpioPin6);
sprintf(G,"%d",dian);
AT_TxFreq(0, G, rev_len);
gEnableRadioRx = true;
osDelayMs(10);
|