-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
optionally allow WPS #4889
optionally allow WPS #4889
Conversation
tools/sdk/include/user_interface.h
Outdated
#define wifi_wps_enable(...) WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool() | ||
#define wifi_wps_disable() WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool() | ||
#define wifi_wps_start() WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool() | ||
#endif | ||
|
||
typedef void (*wps_st_cb_t)(int status); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these 2 lines be moved into the #ifdef ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
cores/esp8266/core_esp8266_main.cpp
Outdated
@@ -156,11 +156,25 @@ void init_done() { | |||
* Peripherals (except for SPI0 and UART0) are not initialized. | |||
* This function does not return. | |||
*/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a descriptive comment about what the #define means (explain it's either WPS or stack optimization, but not both), or at least reference the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this (above, below) be a clear enough explanation with its references ?
doc/faq/readme.rst
Outdated
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
WPS is disabled by default, this offers an extra 4KB in ram/heap. To enable | ||
WPS, use this boards generator option: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please state explicitly that enabling WPS removes the 4KB heap optimization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -571,6 +571,8 @@ int32_t ESP8266WiFiSTAClass::RSSI(void) { | |||
// -------------------------------------------------- STA remote configure ----------------------------------------------- | |||
// ----------------------------------------------------------------------------------------------------------------------- | |||
|
|||
#ifdef NO_EXTRA_4K_HEAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a descriptive comment about what the #define means, or at least reference the issue.
@@ -92,7 +93,13 @@ class ESP8266WiFiSTAClass { | |||
|
|||
public: | |||
|
|||
#ifdef NO_EXTRA_4K_HEAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a descriptive comment about what the #define means, or at least reference the issue.
tools/sdk/include/user_interface.h
Outdated
@@ -575,9 +575,16 @@ enum wps_cb_status { | |||
WPS_CB_ST_UNK, | |||
}; | |||
|
|||
#ifdef NO_EXTRA_4K_HEAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a descriptive comment about what the #define means, or at least reference the issue.
@igrr In this case, should the change be moved into a patch that gets applied over the original user_interface.h file? I'm thinking of migration to future sdk versions, and what will happen with our own changes to this file.
@d-a-v this is pretty good. My sole requests is to add comments to explain what it means. I'm thinking of the future when we come back and look at this, to avoid head scratching/WTFs and so on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor suggestion.
While we three know what "no extra 4k heap" means, an end user coming to this from outside wouldn't and would never want less heap. They might want WPS, though. A better name for the #define and build.py
parameter might be "enableWPS" (or "disableWPS" if you want to keep same logic polarity in the code now).
doc/faq/readme.rst
Outdated
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
WPS is disabled by default, this offers an extra 4KB in ram/heap. To enable | ||
WPS (and loose 4KB of useable ram), use this boards generator option: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loose -> lose
cores/esp8266/core_esp8266_main.cpp
Outdated
/* | ||
A bit of explanation for this entry point: | ||
|
||
SYS is the RTOS task/context used by the upperlying system to run its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTOS task/context -> SDK task context
There is confusion about RTOS and NONOS, I'd prefer to not add to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of typos
disable WPS by default. Its only enabled if NO_EXTRA_4K_HEAP is defined. To enable you must re-run the board manager with --noextra4kheap. This addes #ifdef NO_EXTRA_4K_HEAP arround WPS usage so it won't generate compiler errors.
boards.txt.py
optionref: #4779