WL865E4-P  36.07.001
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 #define I2C_FLAG_START 0x00000001
56 #define I2C_FLAG_STOP 0x00000002
57 #define I2C_FLAG_WRITE 0x00000004
58 #define I2C_FLAG_READ 0x00000008
61 /* Global enums ==============================================================================*/
62 
64 {
68 
69 /* Global typedefs ==============================================================================*/
70 
71 typedef void* M2MB_I2C_ID_T;
72 
76 typedef struct
77 {
91 
92 /* Global functions =============================================================================*/
93 
94 /*-----------------------------------------------------------------------------------------------*/
132 /*-----------------------------------------------------------------------------------------------*/
133 INT32 m2mb_i2c_open( const CHAR *path, INT32 flags, ... );
134 
135 
136 
137 /*-----------------------------------------------------------------------------------------------*/
174 /*-----------------------------------------------------------------------------------------------*/
176 
177 
178 
179 /*-----------------------------------------------------------------------------------------------*/
236 /*-----------------------------------------------------------------------------------------------*/
238 
239 
240 
241 /*-----------------------------------------------------------------------------------------------*/
280 /*-----------------------------------------------------------------------------------------------*/
281 SSIZE_T m2mb_i2c_read( INT32 fd, void *buf, SIZE_T nbyte );
282 
283 
284 
285 /*-----------------------------------------------------------------------------------------------*/
318 /*-----------------------------------------------------------------------------------------------*/
319 SSIZE_T m2mb_i2c_write( INT32 fd, const void *buf, SIZE_T nbyte );
320 
324 /*-----------------------------------------------------------------------------------------------*/
325 
326 
327 #ifdef __cplusplus
328 }
329 #endif
330 
331 #endif /* M2M_M2MB_I2C_API_H */
unsigned char UINT8
Definition: m2mb_types.h:83
INT32 SSIZE_T
Definition: m2mb_types.h:100
M2MB_I2C_IOCTL_REQUEST
Definition: m2mb_i2c.h:63
SSIZE_T m2mb_i2c_read(INT32 fd, void *buf, SIZE_T nbyte)
Read the I2C device.
UINT32 instance
Definition: m2mb_i2c.h:79
INT32 m2mb_i2c_ioctl(INT32 fd, M2MB_I2C_IOCTL_REQUEST_T request,...)
Configure the I2C device.
INT32 m2mb_i2c_open(const CHAR *path, INT32 flags,...)
Open an I2C device.
SSIZE_T m2mb_i2c_write(INT32 fd, const void *buf, SIZE_T nbyte)
Write to I2C device.
UINT32 transferred
Definition: m2mb_i2c.h:88
INT32 m2mb_i2c_close(INT32 fd)
Closes an I2C device.
void * M2MB_I2C_ID_T
Definition: m2mb_i2c.h:71
UINT32 core_Configuration2
Definition: m2mb_i2c.h:85
UINT32 core_Configuration1
Definition: m2mb_i2c.h:84
UINT8 * buffer
Definition: m2mb_i2c.h:86
enum M2MB_I2C_IOCTL_REQUEST M2MB_I2C_IOCTL_REQUEST_T
UINT32 slave_Max_Clock_Stretch_Us
Definition: m2mb_i2c.h:83
UINT32 length
Definition: m2mb_i2c.h:87
UINT32 SMBUS_Mode
Definition: m2mb_i2c.h:82
UINT32 SIZE_T
Definition: m2mb_types.h:99
unsigned long int UINT32
Definition: m2mb_types.h:85
char CHAR
Definition: m2mb_types.h:74
M2MB_I2C_ID_T accessId
Definition: m2mb_i2c.h:78
signed int INT32
Definition: m2mb_types.h:80
UINT32 slave_Address
Definition: m2mb_i2c.h:81
UINT32 bus_Frequency_KHz
Definition: m2mb_i2c.h:80
UINT32 flags
Definition: m2mb_i2c.h:89