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.

Revision:
167:84c0a372a020
Parent:
161:aa5281ff4a02
--- a/TARGET_DISCO_L475VG_IOT01A/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_ll_spi.h	Fri Apr 20 11:08:29 2018 +0100
+++ b/TARGET_DISCO_L475VG_IOT01A/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_ll_spi.h	Fri May 11 16:51:14 2018 +0100
@@ -1376,6 +1376,14 @@
   *((__IO uint8_t *)&SPIx->DR) = TxData;
 }
 
+#if __GNUC__
+#    define MAY_ALIAS __attribute__ ((__may_alias__))
+#else
+#    define MAY_ALIAS
+#endif
+
+typedef __IO uint16_t MAY_ALIAS uint16_io_t;
+
 /**
   * @brief  Write 16-Bits in the data register
   * @rmtoll DR           DR            LL_SPI_TransmitData16
@@ -1385,7 +1393,7 @@
   */
 __STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)
 {
-  *((__IO uint16_t *)&SPIx->DR) = TxData;
+  *((uint16_io_t*)&SPIx->DR) = TxData;
 }
 
 /**