"palReadPad" control, how to set it fixed


#1

Hi all,
I want to fix some digital inputs without the attributes.
I need to set PA0 to input with pulldown.
Could not find anything clearly defined online.

I tried=
outlet_out= palReadPad(GPIOA,0,PAL_MODE_INPUT_PULLDOWN)<<27;

but it didn't work.
Thanks Heaps..:stuck_out_tongue_winking_eye:

ps.. This control should work within any object, correct ?


#2

In initialization code, use:
palSetPadMode(GPIOA,0,PAL_MODE_INPUT_PULLDOWN);
and to evaluate the logic level on the GPIO, use:
x=palReadPad(GPIOA,0);
full documentation of the pal... functions is available here.


#3

Excellent !
Have to test it.
These STM32 controls are far more complex then what I am used to with the Arduino.. !:grin:
Dam that link is detailed.....:astonished: