Skip to content

Commit 6115346

Browse files
galakcarlescufi
authored andcommitted
drivers: serial: stm32: Fix possible issue with mixed enum
When building with LLVM we get the following error: uart_stm32.c:272:9: error: implicit conversion from enumeration type 'enum uart_config_parity' to different enumeration type 'enum uart_config_flow_control' [-Werror,-Wenum-conversion] return UART_CFG_PARITY_NONE; ~~~~~~ ^~~~~~~~~~~~~~~~~~~~ We shouldn't be mixing parity and flow control enum's. Use UART_CFG_FLOW_CTRL_NONE instead or UART_CFG_PARITY_NONE. Signed-off-by: Kumar Gala <[email protected]>
1 parent 7be9972 commit 6115346

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/serial/uart_stm32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,15 @@ static inline u32_t uart_stm32_cfg2ll_hwctrl(enum uart_config_flow_control fc)
261261
* LL hardware flow control define.
262262
* @note Supports only LL_USART_HWCONTROL_RTS_CTS.
263263
* @param fc: LL hardware frlow control definition.
264-
* @retval UART_CFG_FLOW_CTRL_RTS_CTS, or UART_CFG_PARITY_NONE.
264+
* @retval UART_CFG_FLOW_CTRL_RTS_CTS, or UART_CFG_FLOW_CTRL_NONE.
265265
*/
266266
static inline enum uart_config_flow_control uart_stm32_ll2cfg_hwctrl(u32_t fc)
267267
{
268268
if (fc == LL_USART_HWCONTROL_RTS_CTS) {
269269
return UART_CFG_FLOW_CTRL_RTS_CTS;
270270
}
271271

272-
return UART_CFG_PARITY_NONE;
272+
return UART_CFG_FLOW_CTRL_NONE;
273273
}
274274

275275
static int uart_stm32_configure(struct device *dev,

0 commit comments

Comments
 (0)