Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement linux-i2c vesion of I2C library for use in Ubuntu platform #9

Closed
wants to merge 12 commits into from

Conversation

pimvanpelt
Copy link
Contributor

@pimvanpelt pimvanpelt commented Jan 24, 2019

This adds i2c.dev_no to mos.yml, which instructs the driver to open /dev/i2c-? as backend for I2C.
It then implements a Linux I2C version of the driver, using ioctl() to select the slave, and read/write to write to it.

Notes:

  • Linux doesn't have a call to free/reset the bus
  • Linux doesn't expose the underlying SCL/SDA pins, so bitbanging a reset is not possible.
  • Linux doesn't allow stop bit to be absent (!)
  • Linux only supports 100KHz frequency.

Basic functionality works -- reading and writing, SMBUS register read/write, and scanning.

src/ubuntu/ubuntu_i2c_master.c Outdated Show resolved Hide resolved
src/ubuntu/ubuntu_i2c_master.c Outdated Show resolved Hide resolved
@rojer
Copy link
Contributor

rojer commented Jan 24, 2019

@rojer rojer closed this Jan 24, 2019
cesantabot pushed a commit that referenced this pull request Jan 24, 2019
Author: @pimvanpelt (#9)

This adds i2c.dev_no to mos.yml, which instructs the driver to open /dev/i2c-? as backend for I2C.
It then implements a Linux I2C version of the driver, using ioctl() to select the slave, and read/write to write to it.

Notes:

Linux doesn't have a call to free/reset the bus
Linux doesn't expose the underlying SCL/SDA pins, so bitbanging a reset is not possible.
Linux doesn't allow stop bit to be absent (!)
Linux only supports 100KHz frequency.
Basic functionality works -- reading and writing, SMBUS register read/write, and scanning.

CL: ubuntu: Implement linux-i2c vesion of I2C library for use in Ubuntu platform

PUBLISHED_FROM=794b7309c24d382ab9287f09bb9e56b961d6db17
cesantabot pushed a commit to mongoose-os-libs/mbedtls that referenced this pull request Jan 24, 2019
Author: @pimvanpelt (mongoose-os-libs/i2c#9)

This adds i2c.dev_no to mos.yml, which instructs the driver to open /dev/i2c-? as backend for I2C.
It then implements a Linux I2C version of the driver, using ioctl() to select the slave, and read/write to write to it.

Notes:

Linux doesn't have a call to free/reset the bus
Linux doesn't expose the underlying SCL/SDA pins, so bitbanging a reset is not possible.
Linux doesn't allow stop bit to be absent (!)
Linux only supports 100KHz frequency.
Basic functionality works -- reading and writing, SMBUS register read/write, and scanning.

CL: ubuntu: Implement linux-i2c vesion of I2C library for use in Ubuntu platform

PUBLISHED_FROM=794b7309c24d382ab9287f09bb9e56b961d6db17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants