File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ enum {
64
64
I2C_ERROR_BUS_BUSY = -2
65
65
};
66
66
67
+ typedef struct {
68
+ int peripheral ;
69
+ PinName sda_pin ;
70
+ int sda_function ;
71
+ PinName scl_pin ;
72
+ int scl_function ;
73
+ } i2c_pinmap_t ;
74
+
67
75
#ifdef __cplusplus
68
76
extern "C" {
69
77
#endif
@@ -136,6 +144,14 @@ extern "C" {
136
144
*
137
145
*/
138
146
147
+ /** Initialize the I2C peripheral. It sets the default parameters for I2C
148
+ * peripheral, and configures its specifieds pins.
149
+ *
150
+ * @param obj The I2C object
151
+ * @param pinmap Pinmap pointer to strucure which holds static pinmap
152
+ */
153
+ void i2c_init_direct (i2c_t * obj , const i2c_pinmap_t * pinmap );
154
+
139
155
/** Initialize the I2C peripheral. It sets the default parameters for I2C
140
156
* peripheral, and configures its specifieds pins.
141
157
*
You can’t perform that action at this time.
0 commit comments