Skip to content

Commit 4d63929

Browse files
committed
STM32L5 : remove warning
[Warning] serial_device.c@657,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare] [Warning] serial_device.c@666,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare] [Warning] serial_device.c@675,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare] [Warning] serial_device.c@676,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare]
1 parent 1bf801a commit 4d63929

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

targets/TARGET_STM/TARGET_STM32L5/serial_device.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
654654
}
655655
if (type == FlowControlRTS) {
656656
// Enable RTS
657-
MBED_ASSERT(pinmap->rx_flow_pin != (UARTName)NC);
657+
MBED_ASSERT(pinmap->rx_flow_pin != NC);
658658
obj_s->hw_flow_ctl = UART_HWCONTROL_RTS;
659659
obj_s->pin_rts = pinmap->rx_flow_pin;
660660
// Enable the pin for RTS function
@@ -663,7 +663,7 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
663663
}
664664
if (type == FlowControlCTS) {
665665
// Enable CTS
666-
MBED_ASSERT(pinmap->tx_flow_pin != (UARTName)NC);
666+
MBED_ASSERT(pinmap->tx_flow_pin != NC);
667667
obj_s->hw_flow_ctl = UART_HWCONTROL_CTS;
668668
obj_s->pin_cts = pinmap->tx_flow_pin;
669669
// Enable the pin for CTS function
@@ -672,8 +672,8 @@ static void _serial_set_flow_control_direct(serial_t *obj, FlowControl type, con
672672
}
673673
if (type == FlowControlRTSCTS) {
674674
// Enable CTS & RTS
675-
MBED_ASSERT(pinmap->rx_flow_pin != (UARTName)NC);
676-
MBED_ASSERT(pinmap->tx_flow_pin != (UARTName)NC);
675+
MBED_ASSERT(pinmap->rx_flow_pin != NC);
676+
MBED_ASSERT(pinmap->tx_flow_pin != NC);
677677
obj_s->hw_flow_ctl = UART_HWCONTROL_RTS_CTS;
678678
obj_s->pin_rts = pinmap->rx_flow_pin;;
679679
obj_s->pin_cts = pinmap->tx_flow_pin;;

0 commit comments

Comments
 (0)