i2c: internal structure to mraa_internal_types
* For use in hooks Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -46,3 +46,14 @@ struct _gpio {
|
|||||||
unsigned int reg_bit_pos;
|
unsigned int reg_bit_pos;
|
||||||
/*@}*/
|
/*@}*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A structure representing a I2C bus
|
||||||
|
*/
|
||||||
|
struct _i2c {
|
||||||
|
/*@{*/
|
||||||
|
int hz; /**< frequency of communication */
|
||||||
|
int fh; /**< the file handle to the /dev/i2c-* device */
|
||||||
|
int addr; /**< the address of the i2c slave */
|
||||||
|
/*@}*/
|
||||||
|
};
|
||||||
|
|||||||
@@ -26,14 +26,6 @@
|
|||||||
#include "smbus.h"
|
#include "smbus.h"
|
||||||
#include "mraa_internal.h"
|
#include "mraa_internal.h"
|
||||||
|
|
||||||
struct _i2c {
|
|
||||||
/*@{*/
|
|
||||||
int hz; /**< frequency of communication */
|
|
||||||
int fh; /**< the file handle to the /dev/i2c-* device */
|
|
||||||
int addr; /**< the address of the i2c slave */
|
|
||||||
/*@}*/
|
|
||||||
};
|
|
||||||
|
|
||||||
mraa_i2c_context
|
mraa_i2c_context
|
||||||
mraa_i2c_init(int bus)
|
mraa_i2c_init(int bus)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user