mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
optionally allow WPS (#4889)
This commit is contained in:
@ -1236,6 +1236,9 @@ def all_boards ():
|
||||
if nofloat:
|
||||
print id + '.build.float='
|
||||
|
||||
if noextra4kheap:
|
||||
print id + '.build.noextra4kheap=-DNO_EXTRA_4K_HEAP'
|
||||
|
||||
print ''
|
||||
|
||||
if boardsgen:
|
||||
@ -1253,11 +1256,8 @@ def package ():
|
||||
|
||||
if packagegen:
|
||||
pkgfname_read = pkgfname + '.orig'
|
||||
# check if backup already exists
|
||||
if os.path.isfile(pkgfname_read):
|
||||
print "package file is in the way, please move it"
|
||||
print " %s" % pkgfname_read
|
||||
sys.exit(1)
|
||||
os.remove(pkgfname_read)
|
||||
os.rename(pkgfname, pkgfname_read)
|
||||
|
||||
# read package file
|
||||
@ -1333,6 +1333,8 @@ def usage (name,ret):
|
||||
print " --speed s - change default serial speed"
|
||||
print " --customspeed s - new serial speed for all boards"
|
||||
print " --nofloat - disable float support in printf/scanf"
|
||||
print " --noextra4kheap - disable extra 4k heap (will enable WPS)"
|
||||
print " --allowWPS - synonym for --noextra4kheap"
|
||||
print ""
|
||||
print " mandatory option (at least one):"
|
||||
print ""
|
||||
@ -1376,6 +1378,7 @@ default_speed = '115'
|
||||
led_default = 2
|
||||
led_max = 16
|
||||
nofloat = False
|
||||
noextra4kheap = False
|
||||
ldgen = False
|
||||
ldshow = False
|
||||
boardsgen = False
|
||||
@ -1391,6 +1394,7 @@ customspeeds = []
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "h",
|
||||
[ "help", "lwip=", "led=", "speed=", "board=", "customspeed=", "nofloat",
|
||||
"noextra4kheap", "allowWPS",
|
||||
"ld", "ldgen", "boards", "boardsgen", "package", "packagegen", "doc", "docgen",
|
||||
"allgen"] )
|
||||
except getopt.GetoptError as err:
|
||||
@ -1434,6 +1438,9 @@ for o, a in opts:
|
||||
elif o in ("--nofloat"):
|
||||
nofloat=True
|
||||
|
||||
elif o in ("--noextra4kheap", "--allowWPS"):
|
||||
noextra4kheap=True
|
||||
|
||||
elif o in ("--ldshow"):
|
||||
ldshow = True
|
||||
|
||||
|
@ -575,13 +575,27 @@ enum wps_cb_status {
|
||||
WPS_CB_ST_UNK,
|
||||
};
|
||||
|
||||
typedef void (*wps_st_cb_t)(int status);
|
||||
|
||||
#ifdef NO_EXTRA_4K_HEAP
|
||||
/* check cores/esp8266/core_esp8266_main.cpp for comments about this */
|
||||
|
||||
bool wifi_wps_enable(WPS_TYPE_t wps_type);
|
||||
bool wifi_wps_disable(void);
|
||||
bool wifi_wps_start(void);
|
||||
|
||||
typedef void (*wps_st_cb_t)(int status);
|
||||
bool wifi_set_wps_cb(wps_st_cb_t cb);
|
||||
|
||||
#else
|
||||
|
||||
bool WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool ();
|
||||
#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()
|
||||
#define wifi_set_wps_cb(...) WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef void (*freedom_outside_cb_t)(uint8 status);
|
||||
int wifi_register_send_pkt_freedom_cb(freedom_outside_cb_t cb);
|
||||
void wifi_unregister_send_pkt_freedom_cb(void);
|
||||
|
Reference in New Issue
Block a user