mx6sx simple i2c write function
‎08-26-2022
07:19 AM
567 Views
dscott_ueidaq
Contributor I
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
1 Reply
‎09-07-2022
06:47 AM
550 Views
Sanket_Parekh
NXP TechSupport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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