Setting the pin pulldown/up feature

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Setting the pin pulldown/up feature

跳至解决方案
1,192 次查看
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.

标记 (5)
0 项奖励
回复
1 解答
1,034 次查看
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 项奖励
回复
2 回复数
1,035 次查看
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 项奖励
回复
1,034 次查看
gsanchez
Contributor III

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

Kind regards.

0 项奖励
回复