This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I2C, I must be stupid.

Am I the only one who finds Zephyrs I2C implementation a little cludgy? Or am I just missing something?

It may be that I'm just used to bare metal I2C but I can't seem to figure out how I can send a few bytes, followed by 512 zero's without allocating a 514 byte array?

What I'm looking for is and i2c_write() that I can tell not to send an I2C_MSG_STOP....

Or am I just looking at it the wrong way?

Thanks folks, I promise I'm working hard to get past the dumb questions.

Parents
  • Hello Paul,

    Am I the only one who finds Zephyrs I2C implementation a little cludgy? Or am I just missing something?

    Since the Zephyr RTOS contains a lot of functionality, higher complexity is almost given and finding a good entry point can be challenging. So no, you are not stupid. Confused maybe, but I can definitely feel you there :-)

    What I'm looking for is and i2c_write() that I can tell not to send an I2C_MSG_STOP....

    A good starting point should be the I2C API documentation. If the peripheral to use is configured correctly in the devicetree and enabled via Kconfig, it should pretty much be straight forward to use functions like, i2c_write().

    You could also have a look at this example for your reference, demonstrating a simple use case.

    Regards,

    Markus

Reply
  • Hello Paul,

    Am I the only one who finds Zephyrs I2C implementation a little cludgy? Or am I just missing something?

    Since the Zephyr RTOS contains a lot of functionality, higher complexity is almost given and finding a good entry point can be challenging. So no, you are not stupid. Confused maybe, but I can definitely feel you there :-)

    What I'm looking for is and i2c_write() that I can tell not to send an I2C_MSG_STOP....

    A good starting point should be the I2C API documentation. If the peripheral to use is configured correctly in the devicetree and enabled via Kconfig, it should pretty much be straight forward to use functions like, i2c_write().

    You could also have a look at this example for your reference, demonstrating a simple use case.

    Regards,

    Markus

Children
No Data
Related