mirror of
https://github.com/m5stack/M5Stack_MicroPython.git
synced 2026-05-20 10:14:44 -07:00
Fixed bug in unmounting sdcard causing issues with rshell
Fixed bug in curl module affecting sendmail
This commit is contained in:
@@ -415,9 +415,7 @@ STATIC mp_obj_t curl_sendmail(size_t n_args, const mp_obj_t *pos_args, mp_map_t
|
||||
else quickmail_set_debug_log(mailobj, NULL);
|
||||
|
||||
const char* errmsg = NULL;
|
||||
MP_THREAD_GIL_EXIT();
|
||||
errmsg = quickmail_protocol_send(mailobj, mail_server, mail_port, mail_protocol, user, pass);
|
||||
MP_THREAD_GIL_ENTER();
|
||||
|
||||
// Cleanup
|
||||
quickmail_destroy(mailobj);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// MicroPython version info
|
||||
#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.3"
|
||||
#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.4"
|
||||
#define MICROPY_GIT_HASH "g2ddee729"
|
||||
#define MICROPY_BUILD_DATE "2017-01-13"
|
||||
#define MICROPY_BUILD_DATE "2017-01-14"
|
||||
#define MICROPY_VERSION_MAJOR (3)
|
||||
#define MICROPY_VERSION_MINOR (1)
|
||||
#define MICROPY_VERSION_MICRO (3)
|
||||
#define MICROPY_VERSION_STRING "3.1.3"
|
||||
#define MICROPY_VERSION_MICRO (4)
|
||||
#define MICROPY_VERSION_STRING "3.1.4"
|
||||
|
||||
@@ -881,6 +881,39 @@ STATIC mp_obj_t native_vfs_umount(mp_obj_t self_in) {
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_1(native_vfs_umount_obj, native_vfs_umount);
|
||||
|
||||
//------------------
|
||||
int internalUmount()
|
||||
{
|
||||
int res = 0;
|
||||
if (native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH]) {
|
||||
#if MICROPY_USE_SPIFFS
|
||||
res = esp_vfs_spiffs_unregister("internalfs");
|
||||
if (res) res = 0;
|
||||
#else
|
||||
if (s_wl_handle != WL_INVALID_HANDLE) res = wl_unmount(s_wl_handle);
|
||||
if (res) res = 0;
|
||||
#endif
|
||||
native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH] = false;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//-----------------
|
||||
int externalUmount()
|
||||
{
|
||||
int res = 0;
|
||||
if (native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD]) {
|
||||
esp_vfs_fat_sdmmc_unmount();
|
||||
if (res) res = 0;
|
||||
#if defined(CONFIG_SDCARD_MODE1)
|
||||
sdspi_host_deinit();
|
||||
#endif
|
||||
native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD] = false;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------
|
||||
int mount_vfs(int type, char *chdir_to)
|
||||
@@ -913,38 +946,6 @@ int mount_vfs(int type, char *chdir_to)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------
|
||||
int internalUmount()
|
||||
{
|
||||
int res = 0;
|
||||
if (native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH]) {
|
||||
#if MICROPY_USE_SPIFFS
|
||||
res = esp_vfs_spiffs_unregister(NULL);
|
||||
if (res) res = 0;
|
||||
#else
|
||||
if (s_wl_handle != WL_INVALID_HANDLE) res = wl_unmount(s_wl_handle);
|
||||
if (res) res = 0;
|
||||
#endif
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//-----------------
|
||||
int externalUmount()
|
||||
{
|
||||
int res = 0;
|
||||
if (native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD]) {
|
||||
esp_vfs_fat_sdmmc_unmount();
|
||||
if (res) res = 0;
|
||||
#if defined(CONFIG_SDCARD_MODE1)
|
||||
sdspi_host_deinit();
|
||||
#endif
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
//===============================================================
|
||||
STATIC const mp_rom_map_elem_t native_vfs_locals_dict_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_mkfs), MP_ROM_PTR(&native_vfs_mkfs_obj) },
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,6 @@
|
||||
nvs, data, nvs, 0x9000, 16K,
|
||||
otadata, data, ota, 0xd000, 8K,
|
||||
phy_init, data, phy, 0xf000, 4K,
|
||||
MicroPython_1, app, ota_0, 0x10000, 1280K,
|
||||
MicroPython_2, app, ota_1, , 1280K,
|
||||
MicroPython_1, app, ota_0, 0x10000, 1344K,
|
||||
MicroPython_2, app, ota_1, , 1344K,
|
||||
internalfs, data, spiffs, , 1024K,
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -6,6 +6,6 @@
|
||||
nvs, data, nvs, 0x9000, 16K,
|
||||
otadata, data, ota, 0xd000, 8K,
|
||||
phy_init, data, phy, 0xf000, 4K,
|
||||
MicroPython_1, app, ota_0, 0x10000, 1408K,
|
||||
MicroPython_2, app, ota_1, , 1408K,
|
||||
MicroPython_1, app, ota_0, 0x10000, 1472K,
|
||||
MicroPython_2, app, ota_1, , 1472K,
|
||||
internalfs, data, spiffs, , 1024K,
|
||||
|
||||
|
Reference in New Issue
Block a user