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) {
160
160
}
161
161
162
162
uint8_t WiFiClass::beginAP (const char *ssid, uint8_t channel) {
163
- (void ) channel;
164
- return beginAP (ssid, nullptr );
163
+ return beginAP (ssid, nullptr , channel);
165
164
}
166
165
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 );
170
168
}
171
169
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 ) {
173
171
end ();
174
172
175
173
_ssid = ssid;
176
174
_password = passphrase;
177
175
_wifi.setAP ();
178
176
_wifi.setSSID (_ssid.c_str ());
179
177
_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
180
183
_wifi.setTimeout (_timeout);
181
184
_apMode = true ;
182
185
IPAddress gw = _wifi.gatewayIP ();
You can’t perform that action at this time.
0 commit comments