esp8266/modnetwork: .config(): Add "channel" param.

This commit is contained in:
Paul Sokolovsky 2016-04-20 00:25:31 +03:00
parent 1b60a6dc4e
commit 46f0641fba
1 changed files with 9 additions and 0 deletions

View File

@ -273,6 +273,11 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
cfg.ap.password[len] = 0;
break;
}
case QS(MP_QSTR_channel): {
req_if = SOFTAP_IF;
cfg.ap.channel = mp_obj_get_int(kwargs->table[i].value);
break;
}
default:
goto unknown;
}
@ -313,6 +318,10 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs
req_if = SOFTAP_IF;
val = MP_OBJ_NEW_SMALL_INT(cfg.ap.authmode);
break;
case QS(MP_QSTR_channel):
req_if = SOFTAP_IF;
val = MP_OBJ_NEW_SMALL_INT(cfg.ap.channel);
break;
default:
goto unknown;
}