no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
mbed_i2c.h
Go to the documentation of this file.
1/***************************************************************************/
31
32#ifndef MBED_I2C_H_
33#define MBED_I2C_H_
34
35// Platform support needs to be C-compatible to work with other drivers
36#ifdef __cplusplus
37extern "C"
38{
39#endif
40
41#include <stdio.h>
42
43/*
44 * Note: The structure members are not strongly typed, as this file is included
45 * in application specific '.c' files. The mbed code structure does not
46 * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files.
47 * All the members are hence typecasted to mbed specific type during
48 * i2c init and read/write operations.
49 **/
50
56 uint16_t i2c_sda_pin; // I2C SDA pin (PinName)
57 uint16_t i2c_scl_pin; // I2C SCL pin (PinName)
58};
59
65 void *i2c_port; // I2C port instance (mbed::I2C)
66};
67
71extern const struct no_os_i2c_platform_ops mbed_i2c_ops;
72
73#ifdef __cplusplus // Closing extern c
74}
75#endif
76
77#endif /* MBED_I2C_H_ */
const struct no_os_i2c_platform_ops mbed_i2c_ops
Mbed specific I2C platform ops structure.
I2C specific descriptor for the mbed platform.
Definition mbed_i2c.h:64
void * i2c_port
Definition mbed_i2c.h:65
Structure holding the I2C init parameters for mbed platform.
Definition mbed_i2c.h:55
uint16_t i2c_scl_pin
Definition mbed_i2c.h:57
uint16_t i2c_sda_pin
Definition mbed_i2c.h:56
Structure holding I2C function pointers that point to the platform specific function.
Definition no_os_i2c.h:109