summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2023-05-31 10:22:19 +0200
committerDamien George <damien@micropython.org>2023-06-01 11:39:01 +1000
commit1c53bda27f8e7504e5895d3d32bc183e3503420e (patch)
tree8be0f200af9789e4bf63df164abe11253f021bff
parent5a991b4290bd4df608e342fcea563f29738de713 (diff)
ports: Remove os.sync() implementation from stm32 and renesas-ra.
Now that this code was moved to extmod/moduos.c. Signed-off-by: robert-hh <robert@hammelrath.com>
-rw-r--r--ports/renesas-ra/moduos.c18
-rw-r--r--ports/stm32/moduos.c18
2 files changed, 0 insertions, 36 deletions
diff --git a/ports/renesas-ra/moduos.c b/ports/renesas-ra/moduos.c
index ec1929fef..6f524f119 100644
--- a/ports/renesas-ra/moduos.c
+++ b/ports/renesas-ra/moduos.c
@@ -28,24 +28,6 @@
#include "py/runtime.h"
#include "uart.h"
-#if MICROPY_VFS_FAT
-#include "lib/oofatfs/ff.h"
-#include "lib/oofatfs/diskio.h"
-#endif
-
-// sync()
-// Sync all filesystems.
-STATIC mp_obj_t mp_uos_sync(void) {
- #if MICROPY_VFS_FAT
- for (mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table); vfs != NULL; vfs = vfs->next) {
- // this assumes that vfs->obj is fs_user_mount_t with block device functions
- disk_ioctl(MP_OBJ_TO_PTR(vfs->obj), CTRL_SYNC, NULL);
- }
- #endif
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_0(mp_uos_sync_obj, mp_uos_sync);
-
bool mp_uos_dupterm_is_builtin_stream(mp_const_obj_t stream) {
const mp_obj_type_t *type = mp_obj_get_type(stream);
return type == &machine_uart_type;
diff --git a/ports/stm32/moduos.c b/ports/stm32/moduos.c
index 85d0edeca..1f41e68bd 100644
--- a/ports/stm32/moduos.c
+++ b/ports/stm32/moduos.c
@@ -29,24 +29,6 @@
#include "usb.h"
#include "uart.h"
-#if MICROPY_VFS_FAT
-#include "lib/oofatfs/ff.h"
-#include "lib/oofatfs/diskio.h"
-#endif
-
-// sync()
-// Sync all filesystems.
-STATIC mp_obj_t mp_uos_sync(void) {
- #if MICROPY_VFS_FAT
- for (mp_vfs_mount_t *vfs = MP_STATE_VM(vfs_mount_table); vfs != NULL; vfs = vfs->next) {
- // this assumes that vfs->obj is fs_user_mount_t with block device functions
- disk_ioctl(MP_OBJ_TO_PTR(vfs->obj), CTRL_SYNC, NULL);
- }
- #endif
- return mp_const_none;
-}
-MP_DEFINE_CONST_FUN_OBJ_0(mp_uos_sync_obj, mp_uos_sync);
-
#if MICROPY_PY_UOS_URANDOM
// urandom(n)
// Return a bytes object with n random bytes, generated by the hardware