STM32L4 : correct compilation warnings

pull/6697/head
jeromecoutant 2018-04-11 10:05:49 +02:00 committed by adbridge
parent cc5b9575c5
commit d9f97502f4
3 changed files with 11 additions and 3 deletions

View File

@ -120,7 +120,7 @@
#error 'The HAL CAN driver cannot be used with its legacy, Please ensure to enable only one HAL CAN module at once in stm32l4xx_hal_conf.h file'
#endif /* HAL_CAN_MODULE_ENABLED */
#warning 'Legacy HAL CAN driver is enabled! It can be used with known limitations, refer to the release notes. However it is recommended to use rather the new HAL CAN driver'
// #warning 'Legacy HAL CAN driver is enabled! It can be used with known limitations, refer to the release notes. However it is recommended to use rather the new HAL CAN driver'
#if defined(CAN1)

View File

@ -1376,6 +1376,14 @@ __STATIC_INLINE void LL_SPI_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)
*((__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_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)
*/
__STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)
{
*((__IO uint16_t *)&SPIx->DR) = TxData;
*((uint16_io_t*)&SPIx->DR) = TxData;
}
/**

View File

@ -46,7 +46,7 @@ UART_HandleTypeDef uart_handlers[UART_NUM];
static uart_irq_handler irq_handler;
// Defined in serial_api.c
inline int8_t get_uart_index(UARTName uart_name);
extern int8_t get_uart_index(UARTName uart_name);
/******************************************************************************
* INTERRUPTS HANDLING