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 <kumar.gala@linaro.org>
This commit is contained in:
parent
7be9972b52
commit
6115346174
1 changed files with 2 additions and 2 deletions
|
@ -261,7 +261,7 @@ static inline u32_t uart_stm32_cfg2ll_hwctrl(enum uart_config_flow_control fc)
|
||||||
* LL hardware flow control define.
|
* LL hardware flow control define.
|
||||||
* @note Supports only LL_USART_HWCONTROL_RTS_CTS.
|
* @note Supports only LL_USART_HWCONTROL_RTS_CTS.
|
||||||
* @param fc: LL hardware frlow control definition.
|
* @param fc: LL hardware frlow control definition.
|
||||||
* @retval UART_CFG_FLOW_CTRL_RTS_CTS, or UART_CFG_PARITY_NONE.
|
* @retval UART_CFG_FLOW_CTRL_RTS_CTS, or UART_CFG_FLOW_CTRL_NONE.
|
||||||
*/
|
*/
|
||||||
static inline enum uart_config_flow_control uart_stm32_ll2cfg_hwctrl(u32_t fc)
|
static inline enum uart_config_flow_control uart_stm32_ll2cfg_hwctrl(u32_t fc)
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ static inline enum uart_config_flow_control uart_stm32_ll2cfg_hwctrl(u32_t fc)
|
||||||
return UART_CFG_FLOW_CTRL_RTS_CTS;
|
return UART_CFG_FLOW_CTRL_RTS_CTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return UART_CFG_PARITY_NONE;
|
return UART_CFG_FLOW_CTRL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uart_stm32_configure(struct device *dev,
|
static int uart_stm32_configure(struct device *dev,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue