File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -160,23 +160,26 @@ uint8_t WiFiClass::beginAP(const char *ssid) {
160160}
161161
162162uint8_t WiFiClass::beginAP (const char *ssid, uint8_t channel) {
163- (void ) channel;
164- return beginAP (ssid, nullptr );
163+ return beginAP (ssid, nullptr , channel);
165164}
166165
167- uint8_t WiFiClass::beginAP (const char *ssid, const char * passphrase, uint8_t channel) {
168- (void ) channel;
169- return beginAP (ssid, passphrase);
166+ uint8_t WiFiClass::beginAP (const char *ssid, const char * passphrase) {
167+ return beginAP (ssid, passphrase, 0 );
170168}
171169
172- uint8_t WiFiClass::beginAP (const char *ssid, const char * passphrase) {
170+ uint8_t WiFiClass::beginAP (const char *ssid, const char * passphrase, uint8_t channel ) {
173171 end ();
174172
175173 _ssid = ssid;
176174 _password = passphrase;
177175 _wifi.setAP ();
178176 _wifi.setSSID (_ssid.c_str ());
179177 _wifi.setPassword (passphrase);
178+ #if defined(PICO_CYW43_SUPPORTED)
179+ if (channel > 0 ) {
180+ cyw43_wifi_ap_set_channel (&cyw43_state, channel);
181+ }
182+ #endif
180183 _wifi.setTimeout (_timeout);
181184 _apMode = true ;
182185 IPAddress gw = _wifi.gatewayIP ();
You can’t perform that action at this time.
0 commit comments