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

Created a I2C API definition in i2c/api.h to allow the example code to access I2C using a standard interface #19

Open
wants to merge 1 commit into
base: linux-descriptors
Choose a base branch
from

Conversation

RacingTornado
Copy link

This defines a robust and flexible I2C API which allows the example code to access the I2C interface in a manner which is independent of the underlying firmware which is used to implement the I2C functionality. Currently only 1 speed is supported in the firmware. Setting any other i2c_speed will result in an error.

BOOL i2cX_init(enum i2c_speed speed, ...);

/**
* enum Standard available i2c speeds.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments from the uart enum apply here...

@mithro
Copy link
Owner

mithro commented Jul 3, 2016

As I2C is more complex than a UART, we should probably have an example user of this API which shows how they might be called. Can you do two examples;

  • How this API would be implemented using the existing I2C hardware in the FX2.
  • Implement the functions in include/i2c.h (and lib/i2c.c) using this API.
    These examples might end up in a different pull request but it should be ready before we land this one.

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.

3 participants