mx6sx simple i2c write function

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

mx6sx simple i2c write function

450 Views
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 Kudos
Reply
1 Reply

433 Views
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 Kudos
Reply