AnsweredAssumed Answered

How to set gpio2_7 as input or output gpio pin on imx 51 evk with wince 6

Question asked by 謝 端桂 on Apr 11, 2016
Latest reply on Apr 11, 2016 by igorpadykov

Dear all:

 

I try to set gpio2_7 as gpio output pin, but failed. My source is list as below:

 

DDKIomuxSetPinMux(DDK_IOMUX_PIN_EIM_D23,

                      DDK_IOMUX_PIN_MUXMODE_ALT1,

                      DDK_IOMUX_PIN_SION_REGULAR);

 

  DDKIomuxSetPadConfig(DDK_IOMUX_PAD_EIM_D23,

                         DDK_IOMUX_PAD_SLEW_FAST,

                         DDK_IOMUX_PAD_DRIVE_HIGH,

                         DDK_IOMUX_PAD_OPENDRAIN_NULL,

                         DDK_IOMUX_PAD_PULL_NONE,

                         DDK_IOMUX_PAD_HYSTERESIS_NULL,

                         DDK_IOMUX_PAD_INMODE_NULL,

                         DDK_IOMUX_PAD_OUTVOLT_NULL);

 

  BOOL output = TRUE;

 

  if(!DDKGpioSetConfig(DDK_GPIO_PORT2, 7, DDK_GPIO_DIR_OUT, DDK_GPIO_INTR_NONE))

  {

       TEXTDEBUGMSG((TEXT("Config gpio failed\r\n")));

  }

  while(!g_TerminateThread)

  {

       DDKGpioWriteDataPin(DDK_GPIO_PORT2, 7, output);

       output = ~output;

       Sleep(5000);

  }

 

Thanks for your help,

Victor

Outcomes