This commit is contained in:
anecdata 2021-04-24 19:36:11 -05:00
parent 2e52c0ae62
commit 354b442867
3 changed files with 10 additions and 10 deletions

View File

@ -50,7 +50,7 @@ static void set_mode_station(wifi_radio_obj_t *self, bool state) {
} else {
next_mode = WIFI_MODE_STA;
}
} else {
} else {
if (self->ap_mode) {
next_mode = WIFI_MODE_AP;
} else {
@ -70,7 +70,7 @@ static void set_mode_ap(wifi_radio_obj_t *self, bool state) {
} else {
next_mode = WIFI_MODE_AP;
}
} else {
} else {
if (self->sta_mode) {
next_mode = WIFI_MODE_STA;
} else {

View File

@ -171,8 +171,8 @@ const mp_obj_property_t wifi_radio_hostname_obj = {
};
//| def start_station(self) -> None:
//| """Starts a Wi-Fi Station"""
//| ...
//| """Starts a Station."""
//| ...
//|
STATIC mp_obj_t wifi_radio_start_station(mp_obj_t self) {
return mp_const_none;
@ -180,8 +180,8 @@ STATIC mp_obj_t wifi_radio_start_station(mp_obj_t self) {
MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_start_station_obj, wifi_radio_start_station);
//| def stop_station(self) -> None:
//| """Stops the Wi-Fi Station"""
//| ...
//| """Stops the Station."""
//| ...
//|
STATIC mp_obj_t wifi_radio_stop_station(mp_obj_t self) {
return mp_const_none;
@ -191,7 +191,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_station_obj, wifi_radio_stop_station);
//| def start_ap(self,
//| ssid: ReadableBuffer,
//| password: ReadableBuffer = b"") -> None:
//| """Starts a Wi-Fi Access Point with the specified ssid and password."""
//| """Starts an Access Point with the specified ssid and password."""
//| ...
//|
STATIC mp_obj_t wifi_radio_start_ap(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@ -223,8 +223,8 @@ STATIC mp_obj_t wifi_radio_start_ap(size_t n_args, const mp_obj_t *pos_args, mp_
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(wifi_radio_start_ap_obj, 1, wifi_radio_start_ap);
//| def stop_ap(self) -> None:
//| """Stops the Wi-Fi Access Point"""
//| ...
//| """Stops the Access Point."""
//| ...
//|
STATIC mp_obj_t wifi_radio_stop_ap(mp_obj_t self) {
return mp_const_none;

View File

@ -86,7 +86,7 @@ extern void common_hal_wifi_radio_stop_scanning_networks(wifi_radio_obj_t *self)
extern void common_hal_wifi_radio_start_station(wifi_radio_obj_t *self);
extern void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self);
extern void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_t ssid_len, uint8_t *password, size_t password_len);
extern void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *selfn);
extern void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self);
extern wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t *ssid, size_t ssid_len, uint8_t *password, size_t password_len, uint8_t channel, mp_float_t timeout, uint8_t *bssid, size_t bssid_len);