Fix a few tests
* Re-enable a couple FATFS configurations we added. * Remove MICROPY_PY_IO_FILEIO. * Remove uasyncio from standard unix build. * Re-add our unicode printing improvements.
This commit is contained in:
parent
7e0e6fcdca
commit
18c03a74dd
@ -232,12 +232,10 @@ STATIC mp_obj_t fat_vfs_open(mp_obj_t self_in, mp_obj_t path_in, mp_obj_t mode_i
|
||||
mode |= FA_READ | FA_WRITE;
|
||||
plus_count++;
|
||||
break;
|
||||
#if MICROPY_PY_IO_FILEIO
|
||||
case 'b':
|
||||
bt_count++;
|
||||
type = &mp_type_vfs_fat_fileio;
|
||||
break;
|
||||
#endif
|
||||
case 't':
|
||||
bt_count++;
|
||||
type = &mp_type_vfs_fat_textio;
|
||||
|
@ -72,8 +72,8 @@
|
||||
#define FF_USE_MKFS 1
|
||||
/* This option switches f_mkfs() function. (0:Disable or 1:Enable) */
|
||||
|
||||
#ifdef MICROPY_FF_MKFS_FAT32
|
||||
#define FF_MKFS_FAT32 MICROPY_FF_MKFS_FAT32
|
||||
#ifdef MICROPY_FATFS_MKFS_FAT32
|
||||
#define FF_MKFS_FAT32 MICROPY_FATFS_MKFS_FAT32
|
||||
#else
|
||||
#define FF_MKFS_FAT32 0
|
||||
#endif
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
#define MICROPY_FATFS_EXFAT (0)
|
||||
// FAT32 mkfs takes about 500 bytes.
|
||||
#define MICROPY_FF_MKFS_FAT32 (0)
|
||||
#define MICROPY_FATFS_MKFS_FAT32 (0)
|
||||
|
||||
// Only support simpler HID descriptors on SAMD21.
|
||||
#define CIRCUITPY_USB_HID_MAX_REPORT_IDS_PER_DESCRIPTOR (1)
|
||||
|
@ -45,8 +45,8 @@
|
||||
#define CIRCUITPY_DISPLAY_AREA_BUFFER_SIZE (1920)
|
||||
#define CIRCUITPY_PROCESSOR_COUNT (4)
|
||||
|
||||
#define MICROPY_FF_MKFS_FAT32 (1)
|
||||
#define MICROPY_FATFS_EXFAT (1)
|
||||
#define MICROPY_FATFS_MKFS_FAT32 (1)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -154,6 +154,8 @@ typedef long mp_off_t;
|
||||
#define MICROPY_FATFS_RPATH (2)
|
||||
#define MICROPY_FATFS_MAX_SS (4096)
|
||||
#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
|
||||
#define MICROPY_FATFS_MKFS_FAT32 (1)
|
||||
#define MICROPY_FATFS_USE_LABEL (1)
|
||||
|
||||
#define MICROPY_ALLOC_PATH_MAX (PATH_MAX)
|
||||
|
||||
|
@ -1,3 +1 @@
|
||||
include("$(PORT_DIR)/variants/manifest.py")
|
||||
|
||||
include("$(MPY_DIR)/extmod/uasyncio")
|
||||
|
@ -128,7 +128,6 @@ extern void common_hal_mcu_enable_interrupts(void);
|
||||
#define MICROPY_PY_CMATH (0)
|
||||
#define MICROPY_PY_COLLECTIONS (CIRCUITPY_COLLECTIONS)
|
||||
#define MICROPY_PY_DESCRIPTORS (1)
|
||||
#define MICROPY_PY_IO_FILEIO (1)
|
||||
#define MICROPY_PY_GC (1)
|
||||
// Supplanted by shared-bindings/math
|
||||
#define MICROPY_PY_IO (CIRCUITPY_IO)
|
||||
@ -264,8 +263,8 @@ typedef long mp_off_t;
|
||||
#define MICROPY_FATFS_EXFAT (CIRCUITPY_FULL_BUILD)
|
||||
#endif
|
||||
|
||||
#ifndef MICROPY_FF_MKFS_FAT32
|
||||
#define MICROPY_FF_MKFS_FAT32 (CIRCUITPY_FULL_BUILD)
|
||||
#ifndef MICROPY_FATFS_MKFS_FAT32
|
||||
#define MICROPY_FATFS_MKFS_FAT32 (CIRCUITPY_FULL_BUILD)
|
||||
#endif
|
||||
|
||||
// LONGINT_IMPL_xxx are defined in the Makefile.
|
||||
|
@ -59,6 +59,7 @@ STATIC void uni_print_quoted(const mp_print_t *print, const byte *str_data, uint
|
||||
while (s < top) {
|
||||
unichar ch;
|
||||
ch = utf8_get_char(s);
|
||||
const byte *start = s;
|
||||
s = utf8_next_char(s);
|
||||
if (ch == quote_char) {
|
||||
mp_printf(print, "\\%c", quote_char);
|
||||
@ -72,12 +73,14 @@ STATIC void uni_print_quoted(const mp_print_t *print, const byte *str_data, uint
|
||||
mp_print_str(print, "\\r");
|
||||
} else if (ch == '\t') {
|
||||
mp_print_str(print, "\\t");
|
||||
} else if (ch < 0x100) {
|
||||
} else if (ch <= 0x1f || (0x7f <= ch && ch <= 0xa0) || ch == 0xad) {
|
||||
mp_printf(print, "\\x%02x", ch);
|
||||
} else if (ch < 0x10000) {
|
||||
} else if ((0x2000 <= ch && ch <= 0x200f) || ch == 0x2028 || ch == 0x2029) {
|
||||
mp_printf(print, "\\u%04x", ch);
|
||||
} else {
|
||||
mp_printf(print, "\\U%08x", ch);
|
||||
// Print the full character out.
|
||||
int width = s - start;
|
||||
mp_print_strn(print, (const char *)start, width, 0, ' ', width);
|
||||
}
|
||||
}
|
||||
mp_printf(print, "%c", quote_char);
|
||||
|
Loading…
Reference in New Issue
Block a user