Skip to content

Commit 5dbaa40

Browse files
Add the INTERRUPTIN compilation guard for ESP8266
1 parent 7e7f4f5 commit 5dbaa40

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
17+
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
1818
#include <string.h>
1919
#include <stdint.h>
2020
#include <stdlib.h>
@@ -1232,7 +1232,7 @@ bool ESP8266::set_country_code_policy(bool track_ap, const char *country_code, i
12321232
}
12331233

12341234
done &= _parser.send("AT+CWCOUNTRY_CUR=%d,\"%s\",%d,%d", t_ap, country_code, channel_start, channels)
1235-
&& _parser.recv("OK\n");
1235+
&& _parser.recv("OK\n");
12361236

12371237
if (!done) {
12381238
tr_error("\"AT+CWCOUNTRY_CUR=%d,\"%s\",%d,%d\" - FAIL", t_ap, country_code, channel_start, channels);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef ESP8266_H
1818
#define ESP8266_H
1919

20-
#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
20+
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
2121
#include <stdint.h>
2222

2323
#include "drivers/UARTSerial.h"

components/wifi/esp8266-driver/ESP8266Interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
17+
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
1818

1919
#include <string.h>
2020
#include <stdint.h>
@@ -893,7 +893,7 @@ nsapi_error_t ESP8266Interface::set_country_code(bool track_ap, const char *coun
893893

894894
// Firmware takes only first three characters
895895
strncpy(_ch_info.country_code, country_code, sizeof(_ch_info.country_code));
896-
_ch_info.country_code[sizeof(_ch_info.country_code)-1] = '\0';
896+
_ch_info.country_code[sizeof(_ch_info.country_code) - 1] = '\0';
897897

898898
_ch_info.channel_start = channel_start;
899899
_ch_info.channels = channels;

components/wifi/esp8266-driver/ESP8266Interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef ESP8266_INTERFACE_H
1818
#define ESP8266_INTERFACE_H
1919

20-
#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
20+
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
2121
#include "drivers/DigitalOut.h"
2222
#include "ESP8266/ESP8266.h"
2323
#include "events/EventQueue.h"

0 commit comments

Comments
 (0)