The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: TARGET_DISCO_L476VG/TARGET_STM/TARGET_STM32L4/common_objects.h
- Revision:
- 132:9baf128c2fab
- Parent:
- 128:9bcdf88f62b0
- Child:
- 133:99b5ccf27215
--- a/TARGET_DISCO_L476VG/TARGET_STM/TARGET_STM32L4/common_objects.h Thu Dec 15 11:17:48 2016 +0000 +++ b/TARGET_DISCO_L476VG/TARGET_STM/TARGET_STM32L4/common_objects.h Tue Dec 20 15:36:52 2016 +0000 @@ -59,7 +59,6 @@ PinName pin_ssel; #ifdef DEVICE_SPI_ASYNCH uint32_t event; - uint8_t module; uint8_t transfer_type; #endif }; @@ -83,6 +82,34 @@ #endif }; +struct i2c_s { + /* The 1st 2 members I2CName i2c + * and I2C_HandleTypeDef handle should + * be kept as the first members of this struct + * to ensure i2c_get_obj to work as expected + */ + I2CName i2c; + I2C_HandleTypeDef handle; + uint8_t index; + int hz; + PinName sda; + PinName scl; + IRQn_Type event_i2cIRQ; + IRQn_Type error_i2cIRQ; + uint32_t XferOperation; + volatile uint8_t event; +#if DEVICE_I2CSLAVE + uint8_t slave; + volatile uint8_t pending_slave_tx_master_rx; + volatile uint8_t pending_slave_rx_maxter_tx; +#endif +#if DEVICE_I2C_ASYNCH + uint32_t address; + uint8_t stop; + uint8_t available_events; +#endif +}; + #include "gpio_object.h" #ifdef __cplusplus