How to set K60 Open Drain Output

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

How to set K60 Open Drain Output

1,245 次查看
CaesarI
Contributor III

Hello all,

I use MQX 3.8 on K60 and I want to initialize a output pin as Open Drain Output by using fopen("gpio:output"...

Therefor MQX uses gpio_cpu_configure() in io_gpio_kgpio.c.

I could'nt see how to send the parameter for setting ODE bit in PORTx_PCRyy register.

I did'nt find any define for ODE bit.

How to set ODE bit using fopen("gpio:output"...?

Best regards,

Caesar

0 项奖励
回复
2 回复数

995 次查看
Martin_
NXP Employee
NXP Employee

Hi Caesar,

unfortunately the legacy "gpio" driver has that limitation (ODE bit not supported). MQX 4.0 lwgpio driver supports ODE bit.

995 次查看
CaesarI
Contributor III

Thx Martin.

0 项奖励
回复