Skip to content

Commit 71d7d24

Browse files
committed
STM32L4 : correct compilation warnings
1 parent e7c4120 commit 71d7d24

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_can_legacy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
#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'
121121
#endif /* HAL_CAN_MODULE_ENABLED */
122122

123-
#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'
123+
// #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'
124124

125125
#if defined(CAN1)
126126

targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_ll_spi.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,14 @@ __STATIC_INLINE void LL_SPI_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)
13761376
*((__IO uint8_t *)&SPIx->DR) = TxData;
13771377
}
13781378

1379+
#if __GNUC__
1380+
# define MAY_ALIAS __attribute__ ((__may_alias__))
1381+
#else
1382+
# define MAY_ALIAS
1383+
#endif
1384+
1385+
typedef __IO uint16_t MAY_ALIAS uint16_io_t;
1386+
13791387
/**
13801388
* @brief Write 16-Bits in the data register
13811389
* @rmtoll DR DR LL_SPI_TransmitData16
@@ -1385,7 +1393,7 @@ __STATIC_INLINE void LL_SPI_TransmitData8(SPI_TypeDef *SPIx, uint8_t TxData)
13851393
*/
13861394
__STATIC_INLINE void LL_SPI_TransmitData16(SPI_TypeDef *SPIx, uint16_t TxData)
13871395
{
1388-
*((__IO uint16_t *)&SPIx->DR) = TxData;
1396+
*((uint16_io_t*)&SPIx->DR) = TxData;
13891397
}
13901398

13911399
/**

targets/TARGET_STM/TARGET_STM32L4/serial_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ UART_HandleTypeDef uart_handlers[UART_NUM];
4646
static uart_irq_handler irq_handler;
4747

4848
// Defined in serial_api.c
49-
inline int8_t get_uart_index(UARTName uart_name);
49+
extern int8_t get_uart_index(UARTName uart_name);
5050

5151
/******************************************************************************
5252
* INTERRUPTS HANDLING

0 commit comments

Comments
 (0)