Skip to content

Commit 092784d

Browse files
jimmodpgeorge
authored andcommitted
ports: Remove unused mp_type_{fileio/textio} macros in mpconfigport.h.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
1 parent e65d1e6 commit 092784d

12 files changed

Lines changed: 0 additions & 84 deletions

File tree

ports/cc3200/mpconfigport.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,6 @@
131131
X(EINVAL) \
132132
X(ETIMEDOUT) \
133133

134-
// TODO these should be generic, not bound to fatfs
135-
#define mp_type_fileio mp_type_vfs_fat_fileio
136-
#define mp_type_textio mp_type_vfs_fat_textio
137-
138134
// extra constants
139135
#define MICROPY_PORT_CONSTANTS \
140136
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \

ports/esp32/mpconfigport.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@
135135
#define MICROPY_FATFS_RPATH (2)
136136
#define MICROPY_FATFS_MAX_SS (4096)
137137
#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
138-
#define mp_type_fileio mp_type_vfs_fat_fileio
139-
#define mp_type_textio mp_type_vfs_fat_textio
140138

141139
#define MP_STATE_PORT MP_STATE_VM
142140

ports/esp8266/mpconfigport.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,6 @@ void *esp_native_code_commit(void *, size_t, void *);
134134
// printer for debugging output, goes to UART only
135135
extern const struct _mp_print_t mp_debug_print;
136136

137-
#if MICROPY_VFS_FAT
138-
#define mp_type_fileio mp_type_vfs_fat_fileio
139-
#define mp_type_textio mp_type_vfs_fat_textio
140-
#elif MICROPY_VFS_LFS1
141-
#define mp_type_fileio mp_type_vfs_lfs1_fileio
142-
#define mp_type_textio mp_type_vfs_lfs1_textio
143-
#elif MICROPY_VFS_LFS2
144-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
145-
#define mp_type_textio mp_type_vfs_lfs2_textio
146-
#endif
147-
148137
#define MP_STATE_PORT MP_STATE_VM
149138

150139
// We need an implementation of the log2 function which is not a macro

ports/mimxrt/mpconfigport.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,6 @@ uint32_t trng_random_u32(void);
184184
#define MICROPY_PY_PENDSV_REENTER atomic_state = raise_irq_pri(IRQ_PRI_PENDSV);
185185
#define MICROPY_PY_PENDSV_EXIT restore_irq_pri(atomic_state);
186186

187-
// Use VfsLfs2's types for fileio/textio
188-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
189-
#define mp_type_textio mp_type_vfs_lfs2_textio
190-
191187
// Hooks to add builtins
192188

193189
__attribute__((always_inline)) static inline void enable_irq(uint32_t state) {

ports/nrf/mpconfigport.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,6 @@
133133
#define MICROPY_FATFS_MAX_SS (4096)
134134
#endif
135135

136-
#if MICROPY_VFS
137-
// TODO these should be generic, not bound to a particular FS implementation
138-
#if MICROPY_VFS_FAT
139-
#define mp_type_fileio mp_type_vfs_fat_fileio
140-
#define mp_type_textio mp_type_vfs_fat_textio
141-
#elif MICROPY_VFS_LFS1
142-
#define mp_type_fileio mp_type_vfs_lfs1_fileio
143-
#define mp_type_textio mp_type_vfs_lfs1_textio
144-
#elif MICROPY_VFS_LFS2
145-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
146-
#define mp_type_textio mp_type_vfs_lfs2_textio
147-
#endif
148-
#else // !MICROPY_VFS_FAT
149-
#define mp_type_fileio fatfs_type_fileio
150-
#define mp_type_textio fatfs_type_textio
151-
#endif
152-
153136
// Use port specific uos module rather than extmod variant.
154137
#define MICROPY_PY_UOS (0)
155138

ports/renesas-ra/mpconfigport.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,6 @@
137137
#define MICROPY_FATFS_RPATH (2)
138138
#define MICROPY_FATFS_MULTI_PARTITION (1)
139139

140-
// TODO these should be generic, not bound to a particular FS implementation
141-
#if MICROPY_VFS_FAT
142-
#define mp_type_fileio mp_type_vfs_fat_fileio
143-
#define mp_type_textio mp_type_vfs_fat_textio
144-
#elif MICROPY_VFS_LFS1
145-
#define mp_type_fileio mp_type_vfs_lfs1_fileio
146-
#define mp_type_textio mp_type_vfs_lfs1_textio
147-
#elif MICROPY_VFS_LFS2
148-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
149-
#define mp_type_textio mp_type_vfs_lfs2_textio
150-
#endif
151-
152140
#if MICROPY_PY_MACHINE
153141
#define MACHINE_BUILTIN_MODULE_CONSTANTS \
154142
{ MP_ROM_QSTR(MP_QSTR_umachine), MP_ROM_PTR(&mp_module_machine) }, \

ports/rp2/mpconfigport.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,6 @@
122122
#define MICROPY_FATFS_MAX_SS (FLASH_SECTOR_SIZE)
123123
#endif
124124

125-
#if MICROPY_VFS_FAT && MICROPY_HW_USB_MSC
126-
#define mp_type_fileio mp_type_vfs_fat_fileio
127-
#define mp_type_textio mp_type_vfs_fat_textio
128-
#elif MICROPY_VFS_LFS2
129-
// Use VfsLfs2's types for fileio/textio
130-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
131-
#define mp_type_textio mp_type_vfs_lfs2_textio
132-
#endif
133-
134125
#ifndef MICROPY_BOARD_ENTER_BOOTLOADER
135126
#define MICROPY_BOARD_ENTER_BOOTLOADER(nargs, args)
136127
#endif

ports/samd/mpconfigport.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@
9595
#define MICROPY_PY_UZLIB (1)
9696
#define MICROPY_PY_UASYNCIO (1)
9797

98-
// Use VfsLfs's types for fileio/textio
99-
#define mp_type_fileio mp_type_vfs_lfs1_fileio
100-
#define mp_type_textio mp_type_vfs_lfs1_textio
101-
10298
#define MP_STATE_PORT MP_STATE_VM
10399

104100
// Miscellaneous settings

ports/stm32/mpconfigport.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,18 +151,6 @@
151151
#define MICROPY_FATFS_RPATH (2)
152152
#define MICROPY_FATFS_MULTI_PARTITION (1)
153153

154-
// TODO these should be generic, not bound to a particular FS implementation
155-
#if MICROPY_VFS_FAT
156-
#define mp_type_fileio mp_type_vfs_fat_fileio
157-
#define mp_type_textio mp_type_vfs_fat_textio
158-
#elif MICROPY_VFS_LFS1
159-
#define mp_type_fileio mp_type_vfs_lfs1_fileio
160-
#define mp_type_textio mp_type_vfs_lfs1_textio
161-
#elif MICROPY_VFS_LFS2
162-
#define mp_type_fileio mp_type_vfs_lfs2_fileio
163-
#define mp_type_textio mp_type_vfs_lfs2_textio
164-
#endif
165-
166154
#if MICROPY_PY_PYB
167155
extern const struct _mp_obj_module_t pyb_module;
168156
#define PYB_BUILTIN_MODULE_CONSTANTS \

ports/unix/mpconfigport.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ extern const struct _mp_print_t mp_stderr_print;
224224
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (256)
225225
#define MICROPY_ASYNC_KBD_INTR (1)
226226

227-
#define mp_type_fileio mp_type_vfs_posix_fileio
228-
#define mp_type_textio mp_type_vfs_posix_textio
229-
230227
// type definitions for the specific machine
231228

232229
// For size_t and ssize_t

0 commit comments

Comments
 (0)