Setting the pin pulldown/up feature

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting the pin pulldown/up feature

Jump to solution
778 Views
gsanchez
Contributor III

Hello everybody. I have a question today. I am using LWGPIO pins in an application, and I want to setup the features of pulldown (or up) in some pins configured as inputs. I found the LWGPIO_ATTR_PULL_UP macro, but I don't know the function to applie that feature. MQXIOUG do not mention this. How can I do this?

I'm using a MCU K60N512 and MQX 3.8.1.

Thanks you all.

Kind regards.

0 Kudos
Reply
1 Solution
620 Views
c0170
Senior Contributor III

Hello gsanches,

we added it into documentation, should be mention in our last release (4.0.1), here's the function for setting attributes, you can find it inside lwpgio code files (like lwgpio_kgpio).

boolean lwgpio_set_attribute

(

    /* Pin handle to get function from */

    LWGPIO_STRUCT_PTR  handle,

    /* PORT attribute */

    uint_32 attribute_id,

    /* Attribute value */

    uint_32 value

)

{

     /* the body is not copied */

}


Regards,

c0170

View solution in original post

0 Kudos
Reply
2 Replies
621 Views
c0170
Senior Contributor III

Hello gsanches,

we added it into documentation, should be mention in our last release (4.0.1), here's the function for setting attributes, you can find it inside lwpgio code files (like lwgpio_kgpio).

boolean lwgpio_set_attribute

(

    /* Pin handle to get function from */

    LWGPIO_STRUCT_PTR  handle,

    /* PORT attribute */

    uint_32 attribute_id,

    /* Attribute value */

    uint_32 value

)

{

     /* the body is not copied */

}


Regards,

c0170

0 Kudos
Reply
620 Views
gsanchez
Contributor III

Thanks for your help, I look in the code and I found it.

Kind regards.

0 Kudos
Reply