Skip to content

Commit

Permalink
Add the INTERRUPTIN compilation guard for ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpasztamobica committed Mar 28, 2019
1 parent 7e7f4f5 commit 5dbaa40
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/wifi/esp8266-driver/ESP8266/ESP8266.cpp
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

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

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

if (!done) {
tr_error("\"AT+CWCOUNTRY_CUR=%d,\"%s\",%d,%d\" - FAIL", t_ap, country_code, channel_start, channels);
Expand Down
2 changes: 1 addition & 1 deletion components/wifi/esp8266-driver/ESP8266/ESP8266.h
Expand Up @@ -17,7 +17,7 @@
#ifndef ESP8266_H
#define ESP8266_H

#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#include <stdint.h>

#include "drivers/UARTSerial.h"
Expand Down
4 changes: 2 additions & 2 deletions components/wifi/esp8266-driver/ESP8266Interface.cpp
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)

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

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

_ch_info.channel_start = channel_start;
_ch_info.channels = channels;
Expand Down
2 changes: 1 addition & 1 deletion components/wifi/esp8266-driver/ESP8266Interface.h
Expand Up @@ -17,7 +17,7 @@
#ifndef ESP8266_INTERFACE_H
#define ESP8266_INTERFACE_H

#if DEVICE_SERIAL && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#if DEVICE_SERIAL && DEVICE_INTERRUPTIN && defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_NSAPI_PRESENT) && defined(MBED_CONF_RTOS_PRESENT)
#include "drivers/DigitalOut.h"
#include "ESP8266/ESP8266.h"
#include "events/EventQueue.h"
Expand Down

0 comments on commit 5dbaa40

Please sign in to comment.