cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO STM32W

mounatarzi
Associate
Posted on March 21, 2012 at 11:39

I have problem to get  GPIO input  with Stm32w. I code this function:

 halGpioConfig(PORTA_PIN(1), GPIOCFG_IN);

int32u GpioGet(int32u gpio)

{

  int32u get=1;

  if(gpio/8 < 3) {

            get =   *((volatile int32u *)GPIO_PxIN_BASE+(GPIO_Px_OFFSET*(gpio/8));

    emberSerialPrintf(APP_SERIAL, '' get = %4x \r\n'',get);

    return get;

  }

  return get;

}

But I get 0x08.

what can I do to correct this function?
0 REPLIES 0