Finish renaming os_environ_get_key to os_getenv
.. for consistency.
This commit is contained in:
parent
529ec23ecb
commit
3a92c079fc
@ -103,7 +103,7 @@ void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enable
|
||||
|
||||
#if CIRCUITPY_OS_GETENV
|
||||
char ble_name[1 + MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH];
|
||||
os_environ_err_t result = common_hal_os_environ_get_key_str("CIRCUITPY_BLE_NAME", ble_name, sizeof(ble_name));
|
||||
os_environ_err_t result = common_hal_os_getenv_str("CIRCUITPY_BLE_NAME", ble_name, sizeof(ble_name));
|
||||
if (result == ENVIRON_OK) {
|
||||
ble_svc_gap_device_name_set(ble_name);
|
||||
} else
|
||||
|
@ -519,7 +519,7 @@ void port_idle_until_interrupt(void) {
|
||||
void port_post_boot_py(bool heap_valid) {
|
||||
if (!heap_valid && filesystem_present()) {
|
||||
mp_int_t reserved;
|
||||
if (common_hal_os_environ_get_key_int("CIRCUITPY_RESERVED_PSRAM", &reserved) == ENVIRON_OK) {
|
||||
if (common_hal_os_getenv_int("CIRCUITPY_RESERVED_PSRAM", &reserved) == ENVIRON_OK) {
|
||||
common_hal_espidf_set_reserved_psram(reserved);
|
||||
}
|
||||
common_hal_espidf_reserve_psram();
|
||||
|
@ -38,7 +38,7 @@ typedef enum {
|
||||
// Allocation free version that returns the full length of the value.
|
||||
// If it fits, the return value is 0-terminated. If the value doesn't fit,
|
||||
// *value_len may be an over-estimate but never an under-estimate.
|
||||
os_environ_err_t common_hal_os_environ_get_key_str(const char *key, char *value, size_t value_len);
|
||||
os_environ_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len);
|
||||
|
||||
// Returns ENVIRON_ERR_OK and sets value to the read value. Returns
|
||||
// ENVIRON_ERR_... if the value was not numeric. allocation-free.
|
||||
|
@ -323,7 +323,7 @@ STATIC os_environ_err_t os_environ_get_key_buf_terminated(const char *key, char
|
||||
return result;
|
||||
}
|
||||
|
||||
os_environ_err_t common_hal_os_environ_get_key_str(const char *key, char *value, size_t value_len) {
|
||||
os_environ_err_t common_hal_os_getenv_str(const char *key, char *value, size_t value_len) {
|
||||
bool quoted;
|
||||
os_environ_err_t result = os_environ_get_key_buf_terminated(key, value, value_len, "ed);
|
||||
if (result == ENVIRON_OK && !quoted) {
|
||||
|
@ -251,7 +251,7 @@ void supervisor_start_web_workflow(void) {
|
||||
size_t ssid_len = 0;
|
||||
size_t password_len = 0;
|
||||
|
||||
os_environ_err_t result = common_hal_os_environ_get_key_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid));
|
||||
os_environ_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid));
|
||||
if (result != ENVIRON_OK) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user