Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the INTERRUPTIN compilation guard for ESP8266 #10244

Merged
merged 1 commit into from Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future - styling changes should be separate (I got to this line because its causing merge errors when applying this patch - someone else changed this line elsewhere)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the line above, these 2 are causing conflicts when doing new release candidate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 , just to make sure - you mean "separate commit", not "separate PR"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was forced to change this line by the Travis astyle check, it is likely that another PR faced the same issue.
No idea how astyle missed this when it was committed first, but it is checking the whole file that is being comitted :(
Would it help if the change was in a separate commit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct separate commit at least. I've identified this, 2 PR have t he same changes - #10265

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still having issues with this patch - changing the style for a commit that is targeting 5.13 (country code). I'll move this to 5.13 . Please send separate patch for 5.12 (targeting 5.12 branch) to be included in 5.12.2 release. We will patch manually.


_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