WE310F5  39.00.000
m2mb_i2c.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
28 #ifndef M2M_M2MB_I2C_API_H
29 #define M2M_M2MB_I2C_API_H
30 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
45 /*-----------------------------------------------------------------------------------------------*/
46 
51 /*-----------------------------------------------------------------------------------------------*/
52 
53 
54 /* Global declarations ==========================================================================*/
55 
56 /* Global enums ==============================================================================*/
57 
59 {
63 
64 
65 typedef enum M2MB_I2C_MODE
66 {
70 
71 typedef enum M2MB_I2C_ADDR
72 {
76 
77 
78 /* Global typedefs ==============================================================================*/
79 
83 typedef struct
84 {
98 
99 /* Global functions =============================================================================*/
100 
101 /*-----------------------------------------------------------------------------------------------*/
139 /*-----------------------------------------------------------------------------------------------*/
140 INT32 m2mb_i2c_open( const CHAR *path, INT32 flags, ... );
141 
142 
143 
144 /*-----------------------------------------------------------------------------------------------*/
181 /*-----------------------------------------------------------------------------------------------*/
183 
184 
185 
186 /*-----------------------------------------------------------------------------------------------*/
246 /*-----------------------------------------------------------------------------------------------*/
248 
249 
250 
251 /*-----------------------------------------------------------------------------------------------*/
286 /*-----------------------------------------------------------------------------------------------*/
287 SSIZE_T m2mb_i2c_read( INT32 fd, void *buf, SSIZE_T nbyte );
288 
289 
290 
291 /*-----------------------------------------------------------------------------------------------*/
324 /*-----------------------------------------------------------------------------------------------*/
325 SSIZE_T m2mb_i2c_write( INT32 fd, const void *buf, SSIZE_T nbyte );
326 
327 /*-----------------------------------------------------------------------------------------------*/
358 /*-----------------------------------------------------------------------------------------------*/
360 
361 
365 /*-----------------------------------------------------------------------------------------------*/
366 
367 
368 #ifdef __cplusplus
369 }
370 #endif
371 
372 #endif /* M2M_M2MB_I2C_API_H */
INT32 SSIZE_T
Definition: m2mb_types.h:107
enum M2MB_I2C_IOCTL_REQUEST M2MB_I2C_IOCTL_REQUEST_T
unsigned char UINT8
Definition: m2mb_types.h:86
INT32 m2mb_i2c_close(INT32 fd)
Closes an I2C device.
SSIZE_T m2mb_i2c_write(INT32 fd, const void *buf, SSIZE_T nbyte)
Write to I2C device.
UINT32 slave_Max_Clock_Stretch_Us
Definition: m2mb_i2c.h:90
UINT8 * buffer
Definition: m2mb_i2c.h:93
UINT32 length
Definition: m2mb_i2c.h:94
M2MB_I2C_ADDR_T i2c_addressing
Definition: m2mb_i2c.h:86
UINT32 core_Configuration1
Definition: m2mb_i2c.h:91
UINT32 bus_Frequency_KHz
Definition: m2mb_i2c.h:87
char CHAR
Definition: m2mb_types.h:76
INT32 m2mb_i2c_reset(INT32 fd)
Reset the I2C device.
INT32 m2mb_i2c_ioctl(INT32 fd, M2MB_I2C_IOCTL_REQUEST_T request,...)
Configure the I2C device.
M2MB_I2C_IOCTL_REQUEST
Definition: m2mb_i2c.h:58
SSIZE_T m2mb_i2c_read(INT32 fd, void *buf, SSIZE_T nbyte)
Read the I2C device.
M2MB_I2C_ADDR
Definition: m2mb_i2c.h:71
UINT32 core_Configuration2
Definition: m2mb_i2c.h:92
M2MB_I2C_MODE_T i2c_mode
Definition: m2mb_i2c.h:85
unsigned long int UINT32
Definition: m2mb_types.h:88
UINT32 transferred
Definition: m2mb_i2c.h:95
signed int INT32
Definition: m2mb_types.h:82
UINT32 SMBUS_Mode
Definition: m2mb_i2c.h:89
M2MB_I2C_MODE
Definition: m2mb_i2c.h:65
enum M2MB_I2C_ADDR M2MB_I2C_ADDR_T
enum M2MB_I2C_MODE M2MB_I2C_MODE_T
UINT32 slave_Address
Definition: m2mb_i2c.h:88
UINT32 flags
Definition: m2mb_i2c.h:96
INT32 m2mb_i2c_open(const CHAR *path, INT32 flags,...)
Open an I2C device.