RTOS enabled i2c-driver based on the official i2c-C-api.

Dependencies:   mbed-rtos

Fork of mbed-RtosI2cDriver by Helmut Schmücker

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers i2cRtos_api.h Source File

i2cRtos_api.h

00001 
00002 #ifndef MBED_I2CRTOS_API_H
00003 #define MBED_I2CRTOS_API_H
00004 
00005 #include "i2c_api.h"
00006 
00007 #if DEVICE_I2C
00008 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012     void i2cRtos_init(i2c_t *obj, PinName sda, PinName scl);
00013 
00014     int  i2cRtos_read(i2c_t *obj, int address, char *data, int length, int stop);
00015     int  i2cRtos_write(i2c_t *obj, int address, const char *data, int length, int stop);
00016     int  i2cRtos_byte_read(i2c_t *obj, int last);
00017     int  i2cRtos_byte_write(i2c_t *obj, int data);
00018     int  i2cRtos_stop(i2c_t *obj);
00019 
00020 #if DEVICE_I2CSLAVE
00021     int  i2cRtos_slave_receive(i2c_t *obj, uint32_t tmOut);
00022     int  i2cRtos_slave_read(i2c_t *obj, char *data, int length);
00023     int  i2cRtos_slave_write(i2c_t *obj, const char *data, int length);
00024 #endif
00025 
00026 #ifdef __cplusplus
00027 }
00028 #endif
00029 
00030 #endif
00031 
00032 #endif