Setting the pin pulldown/up feature

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Setting the pin pulldown/up feature

ソリューションへジャンプ
587件の閲覧回数
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 解決策
429件の閲覧回数
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 返答(返信)
430件の閲覧回数
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 件の賞賛
429件の閲覧回数
gsanchez
Contributor III

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

Kind regards.

0 件の賞賛