mx6sx simple i2c write function

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

mx6sx simple i2c write function

286 次查看
dscott_ueidaq
Contributor I

I need to output a 16-bit value to a single i2c device at boot time. 

A simple polled write with no interrupts or dma is all I need.

This will be on a mx6sx using i2c4.

Is there an example that you could point me to?

0 项奖励
1 回复

269 次查看
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @dscott_ueidaq 

I hope you are doing well.

You can use i2cset and i2cget Linux commands. Please find the reference from below.

To write the data: i2cset -y <I2C Bus No.> <Slave address> <Offset> <Data>

To read the data: i2cget -y <I2C Bus No.> <Slave address> <Offset>

Thanks & Regards

Sanket Parekh

0 项奖励