GPIO Access on Apalis iMX6Q

in gpio access from toradex library code.following problems are come

  1. writing code in vc sharp from toradex side but when FORM1 clik from gpio access purpose that time no response…
  2. code below
  3. so always Else condition executed that’s the reason gpio library not executed properly.


private void btnDeinit_Click(object sender, EventArgs e)
            if (false == gpio.Gpio_Close(hGPIO))
                MessageBox.Show("Error:- Gpio Close");
                if (false == gpio.Gpio_Deinit(hGPIO))
                    MessageBox.Show("Error Deinit GPIO handle");
            /// GUI code
            btnDeinit.Enabled = false;
            btnOutput.Enabled = false;
            btnInput.Enabled = false;
            btnOn.Enabled = false;
            btnOff.Enabled = false;
            btnSetGpio.Enabled = true;
            tmrBtnLevel.Enabled = false;
            lblPinLevl.Text = "".ToString();

What else is executed?
Gpio_Close should always return true on i.MX6.
Gpio_Deinit may return false only if the handle is null (hGPIO == 0) and this should happen only if GPIO_Init failed in some way.
Can you check return code of the init call?