summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-10-26 16:53:25 -0700
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-10-30 18:29:20 -0700
commit4aeef100f6d78313e1cc58fb6ef6d6b0da5c879d (patch)
tree65289dee99b86f0fb7fd8ed25ebac6beee4e1e2a /main.c
parent189366983366cf5cad214d15070a0a53ccce24a8 (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 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index a2e4b9f72..d5680d05d 100644
--- a/main.c
+++ b/main.c
@@ -234,8 +234,8 @@ int __attribute__((used)) main(void) {
autoreload_enable();
// By default our internal flash is readonly to local python code and
- // writeable over USB. Set it here so that boot.py can change it.
- filesystem_default_writeable(false);
+ // writable over USB. Set it here so that boot.py can change it.
+ filesystem_writable_by_python(false);
// If not in safe mode, run boot before initing USB and capture output in a
// file.
@@ -244,12 +244,12 @@ int __attribute__((used)) main(void) {
#ifdef CIRCUITPY_BOOT_OUTPUT_FILE
// Since USB isn't up yet we can cheat and let ourselves write the boot
// output file.
- filesystem_default_writeable(true);
+ filesystem_writable_by_python(true);
FIL file_pointer;
boot_output_file = &file_pointer;
f_open(&((fs_user_mount_t *) MP_STATE_VM(vfs_mount_table)->obj)->fatfs,
boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
- filesystem_default_writeable(false);
+ filesystem_writable_by_python(false);
#endif
// TODO(tannewt): Re-add support for flashing boot error output.