mirror of https://github.com/ARMmbed/mbed-os.git
Cellular: Fix astyle
parent
27024b34e3
commit
4b3ef73333
|
@ -72,7 +72,7 @@ void poll_pending_messages(CellularNonIPSocket &sock, int count)
|
|||
{
|
||||
uint8_t buf[100] = {0};
|
||||
sock.set_timeout(1000);
|
||||
for (int i=0; i < count; i++) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (i == 0 || i == 2) {
|
||||
(void) sock.send("", 0); // poll to clear any remaining MT messages
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ void NIDDSOCKET_SEND_INVALID()
|
|||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.open(CellularContext::get_default_nonip_instance()));
|
||||
|
||||
TEST_ASSERT_EQUAL(sock.send(NULL, 0), NSAPI_ERROR_PARAMETER);
|
||||
TEST_ASSERT_EQUAL(sock.send(NULL, MAX_CP_DATA_RECV_LEN + 1), NSAPI_ERROR_PARAMETER);
|
||||
TEST_ASSERT_EQUAL(sock.send(NULL, MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN + 1), NSAPI_ERROR_PARAMETER);
|
||||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
|
|
|
@ -430,7 +430,8 @@ bool AT_CellularContext::get_context()
|
|||
return true;
|
||||
}
|
||||
|
||||
const char* AT_CellularContext::get_nonip_context_type_str() {
|
||||
const char *AT_CellularContext::get_nonip_context_type_str()
|
||||
{
|
||||
return "Non-IP";
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ void AT_ControlPlane_netif::urc_cp_recv()
|
|||
|
||||
nsapi_size_or_error_t AT_ControlPlane_netif::send(const void *cpdata, nsapi_size_t cpdata_length)
|
||||
{
|
||||
if (cpdata_length > MAX_CP_DATA_RECV_LEN) {
|
||||
if (cpdata_length > MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN) {
|
||||
return NSAPI_ERROR_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ nsapi_size_or_error_t AT_ControlPlane_netif::recv(void *cpdata, nsapi_size_t cpd
|
|||
{
|
||||
_at.lock();
|
||||
if (_packet_list.count() <= 0) {
|
||||
(void) send("", 0); // poll for missing +CRTDCP indications
|
||||
(void) send("", 0); // poll for missing +CRTDCP indications
|
||||
if (_packet_list.count() <= 0) {
|
||||
return NSAPI_ERROR_WOULD_BLOCK;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ NetworkStack *QUECTEL_BC95_CellularContext::get_stack()
|
|||
}
|
||||
#endif // #if !NSAPI_PPP_AVAILABLE
|
||||
|
||||
const char* QUECTEL_BC95_CellularContext::get_nonip_context_type_str()
|
||||
const char *QUECTEL_BC95_CellularContext::get_nonip_context_type_str()
|
||||
{
|
||||
return "NONIP";
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ protected:
|
|||
#if !NSAPI_PPP_AVAILABLE
|
||||
virtual NetworkStack *get_stack();
|
||||
#endif // #if !NSAPI_PPP_AVAILABLE
|
||||
virtual const char* get_nonip_context_type_str();
|
||||
virtual const char *get_nonip_context_type_str();
|
||||
};
|
||||
|
||||
} /* namespace mbed */
|
||||
|
|
|
@ -44,7 +44,7 @@ NetworkStack *UBLOX_N2XX_CellularContext::get_stack()
|
|||
}
|
||||
#endif
|
||||
|
||||
const char* UBLOX_N2XX_CellularContext::get_nonip_context_type_str()
|
||||
const char *UBLOX_N2XX_CellularContext::get_nonip_context_type_str()
|
||||
{
|
||||
return "NONIP";
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ protected:
|
|||
virtual NetworkStack *get_stack();
|
||||
#endif
|
||||
|
||||
virtual const char* get_nonip_context_type_str();
|
||||
virtual const char *get_nonip_context_type_str();
|
||||
};
|
||||
|
||||
} /* namespace mbed */
|
||||
|
|
|
@ -42,8 +42,8 @@ nsapi_error_t UBLOX_N2XX_CellularNetwork::clear()
|
|||
}
|
||||
|
||||
nsapi_error_t UBLOX_N2XX_CellularNetwork::set_ciot_optimization_config(CIoT_Supported_Opt supported_opt,
|
||||
CIoT_Preferred_UE_Opt preferred_opt,
|
||||
Callback<void(CIoT_Supported_Opt)> network_support_cb)
|
||||
CIoT_Preferred_UE_Opt preferred_opt,
|
||||
Callback<void(CIoT_Supported_Opt)> network_support_cb)
|
||||
{
|
||||
_ciotopt_network_support_cb = network_support_cb;
|
||||
nsapi_error_t err = _at.at_cmd_discard("+CRTDCP", "=", "%d", 1);
|
||||
|
|
Loading…
Reference in New Issue