Skip to content

Commit c9eaa07

Browse files
author
Veijo Pesonen
committed
ESP8266: astyle, remove from the .astyleignore-file
1 parent 7ed16fb commit c9eaa07

File tree

3 files changed

+33
-34
lines changed

3 files changed

+33
-34
lines changed

.astyleignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ rtos/TARGET_CORTEX/rtx5
2121
TESTS/mbed_hal/trng/pithy
2222
targets
2323
components/802.15.4_RF
24-
components/wifi
2524
components/TARGET_PSA/TARGET_TFM
2625
tools
2726
components/TARGET_PSA/services/attestation/COMPONENT_PSA_SRV_IMPL/tfm_impl

components/wifi/esp8266-driver/ESP8266/ESP8266.cpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool ESP8266::at_available()
100100

101101
_smutex.lock();
102102
// Might take a while to respond after HW reset
103-
for(int i = 0; i < 5; i++) {
103+
for (int i = 0; i < 5; i++) {
104104
ready = _parser.send("AT")
105105
&& _parser.recv("OK\n");
106106
if (ready) {
@@ -195,7 +195,7 @@ bool ESP8266::start_uart_hw_flow_ctrl(void)
195195

196196
if (done) {
197197
// Start board's flow control
198-
_serial.set_flow_control(SerialBase::RTSCTS, _serial_rts, _serial_cts);
198+
_serial.set_flow_control(SerialBase::RTSCTS, _serial_rts, _serial_cts);
199199
}
200200

201201
} else if (_serial_rts != NC) {
@@ -591,7 +591,7 @@ nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount)
591591
// Data stream can be truncated
592592
if (amount > 2048 && _sock_i[id].proto == NSAPI_TCP) {
593593
amount = 2048;
594-
// Datagram must stay intact
594+
// Datagram must stay intact
595595
} else if (amount > 2048 && _sock_i[id].proto == NSAPI_UDP) {
596596
tr_debug("UDP datagram maximum size is 2048");
597597
return NSAPI_ERROR_PARAMETER;
@@ -606,7 +606,7 @@ nsapi_error_t ESP8266::send(int id, const void *data, uint32_t amount)
606606
goto END;
607607
}
608608

609-
if(!_parser.recv(">")) {
609+
if (!_parser.recv(">")) {
610610
tr_debug("ESP8266::send(): didn't get \">\"");
611611
ret = NSAPI_ERROR_WOULD_BLOCK;
612612
goto END;
@@ -657,7 +657,7 @@ void ESP8266::_oob_packet_hdlr()
657657
return;
658658
}
659659

660-
if(_tcp_passive && _sock_i[id].open == true && _sock_i[id].proto == NSAPI_TCP) {
660+
if (_tcp_passive && _sock_i[id].open == true && _sock_i[id].proto == NSAPI_TCP) {
661661
if (_parser.recv("%d\n", &amount)) {
662662
_sock_i[id].tcp_data_avbl = amount;
663663

@@ -726,7 +726,7 @@ int32_t ESP8266::_recv_tcp_passive(int id, void *data, uint32_t amount, uint32_t
726726
_process_oob(timeout, true);
727727

728728
if (_sock_i[id].tcp_data_avbl != 0) {
729-
_sock_i[id].tcp_data = (char*)data;
729+
_sock_i[id].tcp_data = (char *)data;
730730
_sock_i[id].tcp_data_rcvd = NSAPI_ERROR_WOULD_BLOCK;
731731
_sock_active_id = id;
732732

@@ -735,7 +735,7 @@ int32_t ESP8266::_recv_tcp_passive(int id, void *data, uint32_t amount, uint32_t
735735

736736
// NOTE: documentation v3.0 says '+CIPRECVDATA:<data_len>,' but it's not how the FW responds...
737737
bool done = _parser.send("AT+CIPRECVDATA=%d,%lu", id, amount)
738-
&& _parser.recv("OK\n");
738+
&& _parser.recv("OK\n");
739739

740740
_sock_i[id].tcp_data = NULL;
741741
_sock_active_id = -1;
@@ -972,26 +972,26 @@ bool ESP8266::_recv_ap(nsapi_wifi_ap_t *ap)
972972

973973
if (FW_AT_LEAST_VERSION(_at_v.major, _at_v.minor, _at_v.patch, 0, ESP8266_AT_VERSION_WIFI_SCAN_CHANGE)) {
974974
ret = _parser.recv("+CWLAP:(%d,\"%32[^\"]\",%hhd,\"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\",%hhu,%d,%d,%d,%d,%d,%d)\n",
975-
&sec,
976-
ap->ssid,
977-
&ap->rssi,
978-
&ap->bssid[0], &ap->bssid[1], &ap->bssid[2], &ap->bssid[3], &ap->bssid[4], &ap->bssid[5],
979-
&ap->channel,
980-
&dummy,
981-
&dummy,
982-
&dummy,
983-
&dummy,
984-
&dummy,
985-
&dummy);
975+
&sec,
976+
ap->ssid,
977+
&ap->rssi,
978+
&ap->bssid[0], &ap->bssid[1], &ap->bssid[2], &ap->bssid[3], &ap->bssid[4], &ap->bssid[5],
979+
&ap->channel,
980+
&dummy,
981+
&dummy,
982+
&dummy,
983+
&dummy,
984+
&dummy,
985+
&dummy);
986986
} else {
987987
ret = _parser.recv("+CWLAP:(%d,\"%32[^\"]\",%hhd,\"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\",%hhu,%d,%d)\n",
988-
&sec,
989-
ap->ssid,
990-
&ap->rssi,
991-
&ap->bssid[0], &ap->bssid[1], &ap->bssid[2], &ap->bssid[3], &ap->bssid[4], &ap->bssid[5],
992-
&ap->channel,
993-
&dummy,
994-
&dummy);
988+
&sec,
989+
ap->ssid,
990+
&ap->rssi,
991+
&ap->bssid[0], &ap->bssid[1], &ap->bssid[2], &ap->bssid[3], &ap->bssid[4], &ap->bssid[5],
992+
&ap->channel,
993+
&dummy,
994+
&dummy);
995995

996996
}
997997

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void ESP8266Interface::_connect_async()
183183
_connect_event_id = _global_event_queue->call_in(ESP8266_CONNECT_TIMEOUT, callback(this, &ESP8266Interface::_connect_async));
184184
if (!_connect_event_id) {
185185
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_ENOMEM), \
186-
"ESP8266Interface::_connect_async(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
186+
"ESP8266Interface::_connect_async(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
187187
}
188188
}
189189
_cmutex.unlock();
@@ -227,7 +227,7 @@ int ESP8266Interface::connect()
227227

228228
if (!_connect_event_id) {
229229
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_ENOMEM), \
230-
"connect(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
230+
"connect(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
231231
}
232232

233233
while (_if_blocking && (_conn_status_to_error() != NSAPI_ERROR_IS_CONNECTED)
@@ -582,12 +582,12 @@ int ESP8266Interface::socket_send(void *handle, const void *data, unsigned size)
582582
status = _esp.send(socket->id, data, size);
583583

584584
if (status == NSAPI_ERROR_WOULD_BLOCK
585-
&& socket->proto == NSAPI_TCP
586-
&& core_util_atomic_cas_u8(&_cbs[socket->id].deferred, &expect_false, true)) {
585+
&& socket->proto == NSAPI_TCP
586+
&& core_util_atomic_cas_u8(&_cbs[socket->id].deferred, &expect_false, true)) {
587587
tr_debug("Postponing SIGIO from the device");
588588
if (!_global_event_queue->call_in(50, callback(this, &ESP8266Interface::event_deferred))) {
589589
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_ENOMEM), \
590-
"socket_send(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
590+
"socket_send(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
591591
}
592592

593593
} else if (status == NSAPI_ERROR_WOULD_BLOCK && socket->proto == NSAPI_UDP) {
@@ -741,7 +741,7 @@ void ESP8266Interface::event()
741741
_oob_event_id = _global_event_queue->call_in(50, callback(this, &ESP8266Interface::proc_oob_evnt));
742742
if (!_oob_event_id) {
743743
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_DRIVER, MBED_ERROR_CODE_ENOMEM), \
744-
"ESP8266Interface::event(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
744+
"ESP8266Interface::event(): unable to add event to queue. Increase \"events.shared-eventsize\"\n");
745745
}
746746
}
747747

@@ -821,8 +821,8 @@ void ESP8266Interface::refresh_conn_state_cb()
821821

822822
void ESP8266Interface::proc_oob_evnt()
823823
{
824-
_oob_event_id = 0; // Allows creation of a new event
825-
_esp.bg_process_oob(ESP8266_RECV_TIMEOUT, true);
824+
_oob_event_id = 0; // Allows creation of a new event
825+
_esp.bg_process_oob(ESP8266_RECV_TIMEOUT, true);
826826
}
827827

828828
nsapi_error_t ESP8266Interface::_conn_status_to_error()

0 commit comments

Comments
 (0)