Browse Source

cc3200: Optimize check for WLAN AP mode.

pull/1358/merge
Daniel Campora 9 years ago
parent
commit
d680e28a11
  1. 4
      cc3200/mods/modwlan.c

4
cc3200/mods/modwlan.c

@ -750,7 +750,7 @@ STATIC mp_obj_t wlan_connect(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
};
// check for correct wlan mode
if (wlan_obj.mode != ROLE_STA && wlan_obj.mode != ROLE_P2P) {
if (wlan_obj.mode == ROLE_AP) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible));
}
@ -947,7 +947,7 @@ STATIC mp_obj_t wlan_scan(mp_obj_t self_in) {
};
// check for correct wlan mode
if (wlan_obj.mode != ROLE_STA && wlan_obj.mode != ROLE_P2P) {
if (wlan_obj.mode == ROLE_AP) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, mpexception_os_request_not_possible));
}

Loading…
Cancel
Save