Skip to content

Allow ESP8266 to provide default WifiInterface #78

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

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

SeppoTakalo
Copy link
Contributor

ESP can be se to be default interface for the build by setting
"esp8266.provide-default": true, in mbed_app.json

@kjbracey-arm Any opinions, is this the correct configuration option?

@SeppoTakalo SeppoTakalo requested a review from kjbracey August 13, 2018 10:09
Copy link

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

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

Conceptually fine.

@@ -575,3 +575,12 @@ nsapi_connection_status_t ESP8266Interface::get_connection_status() const
{
return _esp.get_connection_status();
}

#ifdef MBED_CONF_ESP8266_PROVIDE_DEFAULT

Choose a reason for hiding this comment

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

This should be #if, and then the JSON can be true/false.

#ifdef MBED_CONF_ESP8266_PROVIDE_DEFAULT

WiFiInterface *WiFiInterface::get_default_instance() {
static ESP8266Interface esp();

Choose a reason for hiding this comment

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

Do you need the ()?

ESP can be se to be default interface for the build by setting
"esp8266.provide-default": true, in mbed_app.json
@SeppoTakalo
Copy link
Contributor Author

Changed to #if MBED_CONF_ESP8266_PROVIDE_DEFAULT and mbed_lib.json is now

{
    "name": "esp8266",
    "config": {
        ...
        "provide-default": {
            "help": "Provide default WifiInterface. [true/false]",
            "value": false
        }
   }
}

@SeppoTakalo SeppoTakalo merged commit 8424bec into master Aug 13, 2018
@SeppoTakalo SeppoTakalo deleted the default_interface branch August 13, 2018 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants