104 Commits

Author SHA1 Message Date
Richard Blakesley
d9d0e1c0a7 Don't throw an error in jsfsInit() if it fails (e.g. due to no SD card) - just return false 2024-09-28 21:50:14 +02:00
Gordon Williams
87b1871a37 Fix call of SD_WriteMultiBlocks, and reduce write block size to 512b
as we were seeing DISK_ERR write errors (unsure of why)
2024-09-20 15:38:44 +01:00
Gordon Williams
6495ec0758 Add ESPR_FS_LARGE_WRITE_BUFFER to allow faster SD card writes 2024-09-18 12:09:09 +01:00
Richard Blakesley
b79b0b8506 Added jswrap_fs_getfree() 2024-09-05 23:31:29 +01:00
Gordon Williams
281f01b45c Fix SD card read of multiple blocks on non-HC SD cards 2024-08-27 16:33:12 +01:00
Richard Blakesley
9f2eb167ce Upgrade FatFs library from R0.10c to R0.15 2024-08-05 00:21:17 +02:00
Richard Blakesley
d131dd29fc jsfsInit(): wait a bit after enabling SD card power (if it was turned off) 2024-08-04 23:41:12 +02:00
Gordon Williams
f3ccf1fee5 add ESPR_SDIO_FAST_UNALIGNED - a bit of a nasty hack, but it drastically increases read speed for us, without having to mess around trying to always align the buffer reads 2024-07-26 20:49:25 +01:00
Richard Blakesley
f03dd96a47 Add optional power supply enable pin for SD card 2024-07-23 14:41:57 +02:00
Gordon Williams
a45ce38bfe Add a 'safe' disk_read function for when data buffer is unaligned
Slightly speed up RLE decode by only doing the 'end of stream' check right before we run out of data
2024-07-03 11:23:17 +01:00
Gordon Williams
8f08e77403 starting AVI decode 2024-07-02 12:45:52 +01:00
Gordon Williams
90c369060c SDIO SD card reads now working, also A9 USART TX not overwritten! 2024-07-01 17:01:39 +01:00
Gordon Williams
7ca7f36132 working, albeit with slow software SDIO 2024-06-28 16:33:31 +01:00
Gordon Williams
d82f826756 attempt to fix all the broken jsDebug messages 2024-05-15 13:36:08 +01:00
Gordon Williams
1341bceb21 Move commonly used sequences of function calls into functions (eg jsvRemoveChild,jsvUnLock -> jsvRemoveChildAndUnLock) - saves ~200b 2024-02-02 14:16:14 +00:00
Deirdre O Byrne
a24ef40dd2 Speling fix 2024-01-28 17:14:38 +00:00
Gordon Williams
f6894cd54c Remove createChild argument from jsvFindChildFromString, add jsvFindOrAddChildFromString instead 2023-10-06 17:03:59 +01:00
Gordon Williams
4327ebd34e Tidying up error messages (no trailing '.' or '\n'), making almost-similar error messages the same
Used the following to try and find issues:

find . -name "*.c" | xargs -I{} grep -h jsExceptionHere {} | sed -e "s/^[^\"]*\"/\"/" | sort | uniq -c
2023-10-06 10:47:58 +01:00
Gordon Williams
9b30f17227 Added jsvObjectGetChildIfExists to avoid the jsvObjectGetChild(... ,0) case - saves ~300b of flash space 2023-04-25 10:59:34 +01:00
Rob Pilling
9d13de0122 Add PipeOptions to pipe() typescript definitions 2023-04-19 08:21:08 +01:00
Rob Pilling
953f33d683 Update docs with [optional] (for typescript) 2023-02-08 22:48:30 +00:00
qucchia
c5bb94bf7a Limit documentation comments to 80 characters (#2244) 2022-07-27 15:32:19 +02:00
qucchia
ff3fc6dcdf Fix minor typos 2022-07-22 11:48:00 +02:00
deirdreobyrne
333cb9b304 Fixes arising from code review 2022-07-05 15:03:45 +01:00
Gordon Williams
872ba947ce handle case where 'undefined' is passed as an argument to FS.write 2021-09-23 11:58:47 +01:00
MaBecker
bbc372620c esp32_improvements
- add FLASH_BAUD
- fix erase_flash
- switch jsWarn()  to jsDevInfo()
- keep jsWarn()/ jsError() for not implemented functions
- switch jsError() to jsExceptionHere() if helpfull
2020-07-13 17:52:38 +02:00
Gordon Williams
40191f978b Minor tweak to avoid duplicate function in #1626 2019-03-06 16:54:18 +00:00
Thomas Studwell
b3e8964aa1 Fixed fs.statSync() to report in localtime and corrected Month offset. 2019-03-06 10:54:59 -05:00
Gordon Williams
1324c27ff3 Now save file modification time with FAT 2019-03-05 08:53:35 +00:00
Gordon Williams
80db15bd61 add low memory warning if file allocation fails 2018-11-13 13:10:36 +00:00
Gordon Williams
d71c82c012 fix #1230 2018-04-10 08:36:03 +01:00
Gordon Williams
1e23aa6553 remove hidden char from vars that are already in hiddenRoot 2018-03-09 10:54:09 +00:00
Gordon Williams
07ae7710e3 updated filesystem docs 2018-01-29 15:43:10 +00:00
Gordon Williams
773a83387f Improve SD card reliability on all boards by trying to initialise multiple times before failing 2018-01-29 15:16:01 +00:00
Gordon Williams
2b08fe86af fix warnings 2017-12-14 13:03:26 +00:00
Gordon Williams
1068563563 Increase default internal SD card bitrate to 4MHz (from 100k) 2017-12-13 12:43:33 +00:00
Gordon Williams
fe2fe0e2d8 Filesystem API now uses flat strings (avoiding the 512 byte copy for each call) 2017-12-13 12:20:00 +00:00
Gordon Williams
26240e3909 Add E.setFlags({unsyncFiles:1} which doesn't sync the file to the SD card after each write - it's *much* faster 2017-12-13 11:59:13 +00:00
Gordon Williams
aa09ad4f97 jsvNewIterator now has an option to iterate over sparse arrays as if they weren't sparse
Fixed some built-in functions that misbehaved when given sparse arrays
2017-11-24 12:47:43 +00:00
Gordon Williams
735c014659 Internal: Added initialiser argument to jsvNewStringOfLength
Internal: Added jsvObjectSetChildVar/jsvObjectSetChildVar/jsvObjectSetChildVar
            Internal: Fix jsvCopy if given a NAME_INT/etc
            Added ES6's Object.assign
2017-08-31 16:42:31 +01:00
lanselambor
97f19afc7a changed board name WIO_TRAKER_LTE to WIO_LTE 2017-08-03 13:50:47 +08:00
Gordon Williams
3aafa86a70 misc tweak to @wilberforce's code to just avoid reading in long filenames at all 2017-05-11 12:40:13 +01:00
wilberforce
6fc95d1e7f Fat FS: closedir after readdir, FS errors should be catchable (#1164), fs.statSync (#1163) 2017-05-11 12:37:55 +01:00
Gordon Williams
38cb9eab9f Add Array.indexOf fromIndex support (fix #162) 2017-05-05 13:46:58 +01:00
wilberforce
897524388e Merge branch 'master' into ESP32 2017-04-26 15:13:34 +12:00
Gordon Williams
8ec31cff7a fix broken formatting for code 2017-04-24 11:48:27 +01:00
wilberforce
0fb9ed1e21 suppress warnings, FatFS docs, suppress logging 2017-04-22 11:17:45 +12:00
Gordon Williams
7097e156f0 remove un-needed ifdef that was overwriting docs for one about ESP32 (#1145) 2017-04-19 13:26:46 +01:00
wilberforce
5f08a95cb7 Fix File.read so that end of file triggers pipe.end event 2017-04-11 23:16:24 +12:00
wilberforce
6ef6ab4028 get ESP8266 compiling 2017-03-23 15:45:05 +13:00