Skip to content

Commit cc5ccf5

Browse files
committed
STMOD_CELLULAR: remove flow control support for DISCO_L4R9I
1 parent 5108f91 commit cc5ccf5

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ nsapi_error_t STModCellular::soft_power_on()
109109

110110
tr_debug("Modem %sready to receive AT commands\r\n", rdy ? "" : "NOT ");
111111

112-
#if DEVICE_SERIAL_FC
113112
if ((MBED_CONF_STMOD_CELLULAR_CTS != NC) && (MBED_CONF_STMOD_CELLULAR_RTS != NC)) {
114113
tr_debug("Enable flow control\r\n");
115114

@@ -131,7 +130,6 @@ nsapi_error_t STModCellular::soft_power_on()
131130
tr_error("Failed to enable hw flow control\r\n");
132131
}
133132
}
134-
#endif
135133

136134
rtos::ThisThread::sleep_for(500);
137135

@@ -163,10 +161,10 @@ CellularDevice *CellularDevice::get_default_instance()
163161
tr_debug("MODEM default instance\r\n");
164162

165163
static UARTSerial serial(MBED_CONF_STMOD_CELLULAR_TX, MBED_CONF_STMOD_CELLULAR_RX, MBED_CONF_STMOD_CELLULAR_BAUDRATE);
166-
#if defined (MBED_CONF_STMOD_CELLULAR_RTS) && defined(MBED_CONF_STMOD_CELLULAR_CTS)
167-
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d\r\n", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
168-
serial.set_flow_control(SerialBase::RTSCTS, MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
169-
#endif
164+
if ((MBED_CONF_STMOD_CELLULAR_CTS != NC) && (MBED_CONF_STMOD_CELLULAR_RTS != NC)) {
165+
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d\r\n", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
166+
serial.set_flow_control(SerialBase::RTSCTS, MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
167+
}
170168
static STModCellular device(&serial);
171169
return &device;
172170
}

components/cellular/COMPONENT_STMOD_CELLULAR/mbed_lib.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,10 @@
6565
"help": "Provide as default CellularDevice [true/false]",
6666
"value": false
6767
}
68+
},
69+
"target_overrides": {
70+
"DISCO_L4R9I": {
71+
"rts": "NC"
72+
}
6873
}
6974
}

0 commit comments

Comments
 (0)