Skip to content

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

Open
RacingTornado wants to merge 1 commit intomithro:linux-descriptorsfrom
RacingTornado:merge_i2c_api
Open

Created a I2C API definition in i2c/api.h to allow the example code to access I2C using a standard interface#19
RacingTornado wants to merge 1 commit intomithro:linux-descriptorsfrom
RacingTornado:merge_i2c_api

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