@@ -192,16 +192,21 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_station_obj, wifi_radio_stop_station);
192
192
193
193
//| def start_ap(self,
194
194
//| ssid: ReadableBuffer,
195
- //| password: ReadableBuffer = b"") -> None:
196
- //| """Starts an Access Point with the specified ssid and password."""
195
+ //| password: ReadableBuffer = b"",
196
+ //| *,
197
+ //| channel: Optional[int] = 1) -> None:
198
+ //| """Starts an Access Point with the specified ssid and password.
199
+ //|
200
+ //| If ``channel`` is given, the access point will use that channel unless
201
+ //| wifi is already operating on a different channel due to an active station."""
197
202
//| ...
198
203
//|
199
204
STATIC mp_obj_t wifi_radio_start_ap (size_t n_args , const mp_obj_t * pos_args , mp_map_t * kw_args ) {
200
205
enum { ARG_ssid , ARG_password , ARG_channel };
201
206
static const mp_arg_t allowed_args [] = {
202
207
{ MP_QSTR_ssid , MP_ARG_REQUIRED | MP_ARG_OBJ },
203
208
{ MP_QSTR_password , MP_ARG_OBJ , {.u_obj = MP_OBJ_NULL } },
204
- { MP_QSTR_channel , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 0 } },
209
+ { MP_QSTR_channel , MP_ARG_KW_ONLY | MP_ARG_INT , {.u_int = 1 } },
205
210
};
206
211
207
212
wifi_radio_obj_t * self = MP_OBJ_TO_PTR (pos_args [0 ]);
0 commit comments