Problem while reading from GPI


#1

Hi!
I’m trying to use this sample application to write 1 in GPIO_0 and read GPI. I have connected GPIO_0 and GPI and use this code:

void adl_main ( adl_InitType_e InitType )
{            

    adl_atSendResponse ( ADL_AT_UNS, "\r\nWe want to start to recieve sms1\r\n" );
       
    // TO DO : Add your initialization code here
   // adl_tmrSubscribe ( TRUE, 100, ADL_TMR_TYPE_100MS,TimerHandler );
    adl_simSubscribe (SimHandler,NULL);
    GPI_status=1;
            handle=adl_ioSubscribe( ADL_IO_Q24PLUS_GPIO_0, 0, 0x00000000, 0, NULL);  //  ((2))
            adl_ioWrite((u8) handle,ADL_IO_Q24PLUS_GPIO_0,1);
            adl_ioWrite((u8) handle,ADL_IO_Q24PLUS_GPIO_0,ADL_IO_Q24PLUS_GPIO_0);
   while (GPI_status<1000)  //
       {
            handle=adl_ioSubscribe( ADL_IO_Q24PLUS_GPI, 1,0,0, NULL);
            Status=adl_ioRead(handle);
           if(Status==1)
           {
            adl_atSendResponse ( ADL_AT_UNS, "\r\n GPI is high \r\n" );
           }
           adl_atSendResponse ( ADL_AT_UNS, "\r\nNo one touch me!\r\n" );
           GPI_status++;
        }
    sms_automaton_Handle_txt = adl_smsSubscribe(SMS_AUTO_Handler, SMS_AUTO_ctrl_Handler, ADL_SMS_MODE_TEXT);
   
    if(sms_automaton_Handle_txt == ADL_RET_ERR_PARAM){
        adl_atSendResponse ( ADL_AT_UNS, "\r\nCan't subscribe to the sms\r\n" );
    }
    else
    {
        adl_atSendResponse ( ADL_AT_UNS, "\r\nsubscribed to the sms\r\n" );
    }      
}

The GPIO_o is high but i can’t read GPI!
What is wrong in this code?