diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-26 16:53:25 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-10-30 18:29:20 -0700 |
| commit | 4aeef100f6d78313e1cc58fb6ef6d6b0da5c879d (patch) | |
| tree | 65289dee99b86f0fb7fd8ed25ebac6beee4e1e2a /extmod | |
| parent | 189366983366cf5cad214d15070a0a53ccce24a8 (diff) | |
atmel-samd: More USB polish
* Introduce a python script to generate the USB descriptor instead of
a bunch of C macros. In the future, we can use this dynamically in
CircuitPython.
* Add support for detecting read-only mass storage mounts.
Fixes #377
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/vfs_fat.h | 4 | ||||
| -rw-r--r-- | extmod/vfs_fat_diskio.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/extmod/vfs_fat.h b/extmod/vfs_fat.h index 5de1a237b..273ddc84e 100644 --- a/extmod/vfs_fat.h +++ b/extmod/vfs_fat.h @@ -35,8 +35,8 @@ #define FSUSER_NATIVE (0x0001) // readblocks[2]/writeblocks[2] contain native func #define FSUSER_FREE_OBJ (0x0002) // fs_user_mount_t obj should be freed on umount #define FSUSER_HAVE_IOCTL (0x0004) // new protocol with ioctl -// Device is write-able over USB and read-only to MicroPython. -#define FSUSER_USB_WRITEABLE (0x0008) +// Device is writable over USB and read-only to MicroPython. +#define FSUSER_USB_WRITABLE (0x0008) typedef struct _fs_user_mount_t { mp_obj_base_t base; diff --git a/extmod/vfs_fat_diskio.c b/extmod/vfs_fat_diskio.c index ad769001d..3b9d86037 100644 --- a/extmod/vfs_fat_diskio.c +++ b/extmod/vfs_fat_diskio.c @@ -98,9 +98,9 @@ DSTATUS disk_status ( } // This is used to determine the writeability of the disk from MicroPython. - // So, if its USB writeable we make it read-only from MicroPython. + // So, if its USB writable we make it read-only from MicroPython. if (vfs->writeblocks[0] == MP_OBJ_NULL || - (vfs->flags & FSUSER_USB_WRITEABLE) != 0) { + (vfs->flags & FSUSER_USB_WRITABLE) != 0) { return STA_PROTECT; } else { return 0; |
