Why not make esp_wifi_set_country take only the cc code?
Posted: Mon Dec 09, 2019 9:10 am
Hi,
The esp_wifi_set_country takes const wifi_country_t *country as argument.
This seems a little bit odd because the caller needs to set all fields
of wifi_country_t.
I thought the schan/nchan/max_tx_power fields are fixed and determinate by
the cc fields. Why not just take cc fields as argument. (or maybe just cc and policy fields).
In additional, I'm wondering why not using enum for the cc field instead of
char. It's easier to find the supported country code by enum instead of guessing
the supported char field for cc.
The esp_wifi_set_country takes const wifi_country_t *country as argument.
This seems a little bit odd because the caller needs to set all fields
of wifi_country_t.
I thought the schan/nchan/max_tx_power fields are fixed and determinate by
the cc fields. Why not just take cc fields as argument. (or maybe just cc and policy fields).
In additional, I'm wondering why not using enum for the cc field instead of
char. It's easier to find the supported country code by enum instead of guessing
the supported char field for cc.