/*****************从DDR读数据设置**********************/
// Write to discretes register for the specified GPIO channel */
while(1){
/*Read state of discretes for the specified GPIO channnel.*/
Btn_val=XGpio_DiscreteRead(&Gpio, BTN_CHANNEL);
//检测 Btn_val值,如果按钮按下,灯全亮,否则灯全灭
if(Btn_val){
XGpio_DiscreteWrite(&Gpio, LED_CHANNEL, 0x1);