GPIO_PULLUP_PULLDOWN

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

How can i use GPIO PULLUP/PULLDOWN for GPIO,

Using the function

gpio_configurePin(2/16, 2%16, GPIO_EN_INT_FALLING_EDGE,GPIO_PIN_INPUT_HIGH);

or which functions i use...

0 Likes
1 Solution
Anonymous
Not applicable

shrikrishnat@waferspace.com

They are flags, so they are combined with a bitwise OR which is the symbol "|".

Here are a couple of examples directly from my working-well-now code base.  🙂

gpio_configurePin(GPIO_PIN_P0 / 16, GPIO_PIN_P0 % 16, GPIO_INPUT_ENABLE | GPIO_PULL_UP, 0);

gpio_configurePin(COL1 / 16, COL1 % 16, GPIO_INPUT_ENABLE | GPIO_EN_INT_BOTH_EDGE, GPIO_PIN_OUTPUT_LOW);

View solution in original post

3 Replies
Anonymous
Not applicable

shrikrishnat@waferspace.com

They are flags, so they are combined with a bitwise OR which is the symbol "|".

Here are a couple of examples directly from my working-well-now code base.  🙂

gpio_configurePin(GPIO_PIN_P0 / 16, GPIO_PIN_P0 % 16, GPIO_INPUT_ENABLE | GPIO_PULL_UP, 0);

gpio_configurePin(COL1 / 16, COL1 % 16, GPIO_INPUT_ENABLE | GPIO_EN_INT_BOTH_EDGE, GPIO_PIN_OUTPUT_LOW);

Anonymous
Not applicable

Ok i will try this...

0 Likes
Anonymous
Not applicable

Yes it worked..

Thanks   cliff@rayman.com

0 Likes