Commit Graph

8 Commits

Author SHA1 Message Date
Gregor Hartmann a492a31e9c
Add modules struct, bit, color_utils and sjson to luac.cross (#3230) 2024-02-25 09:01:01 +01:00
Nathaniel Wesley Filardo c2b3710f60
Add pipeutils example (#3354)
These have been handy within the test harness for streaming files and
LFS images across to the DUTs.

Add nrec method to pipe

Co-authored-by: Gregor Hartmann <HHHartmann@users.noreply.github.com>
2020-12-29 08:54:54 +01:00
Nathaniel Wesley Filardo 045fc80c70 pipe: comment and style fixes (NFC)
Reflow comments to 80 columns; fix some typos and other nits.
2020-10-23 04:21:51 +01:00
Nathaniel Wesley Filardo 962991ed18 pipe: fix unread buffer chunk management
unread contained two subtle bugs:

 - it created a buffer chunk at pipe[1], when that position is reserved
   for the pipe reader function.  Because it shifted pipe[i] to
   pipe[i+1], including pipe[1], this was likely to manifest as the pipe
   later attempting to dequeue a function rather than a buffer chunk
   user datum.  Solve this by adjusting the loop bounds and creation
   index.

 - when it created a new buffer chunk, it left that chunk's ->start and
   ->end fields at 0, but would then exit the loop to do the tail fill,
   which was in turn assuming the exit condition of the loop when an
   existing chunk had room, namely that data had been moved to the right
   and so ->start > l.  Solve this by making new chunks empty but with
   ->start = ->end = LUAL_BUFFERSIZE.  It may be slightly better to
   instead try to leave room at both ends if the buffer was empty prior
   to this unread.

FIXES: https://github.com/nodemcu/nodemcu-firmware/issues/3155
2020-10-23 04:21:51 +01:00
Terry Ellison 1f2e5bba4a
Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Terry Ellison e7c29fe38e Lua 5.1 to 5.3 realignement phase 1 2020-06-09 22:26:06 +02:00
Terry Ellison 5f147a7352
Baseline version of Pipe library (#2797) 2019-06-19 15:16:17 +03:00