elua_mmc.c uses the virtual timer tick to implement its timeout delays,
and needs MMCFS_TICK_HZ to have the same value as VTMR_FREQ_HZ.
This corrects the mismatch on AVR32 platforms and adds a check to
validate.h to ensure that it remains so.
Tabs have been creeping in to eLua's source files, sometimes representing
2 characters, sometimes 8. This patch replaces them all with the appropriate
number of spaces, according to the context.
This only fixes files that were written specifically for eLua, not the
manufacturers' SDK source files that were simply imported into the tree.
- Added direct access to interrupt flags; an interrupt doesn't have to trigger a handler anymore, its flag(s) can be checked instead (platform_cpu_get_interrupt_flag).
- Added experimental C interrupt handlers support (NOT TESTED). It can be compiled and used separately from the Lua interrupt support implementation. Hint: src/elua_int.c, elua_int_set_c_handler and elua_int_get_c_handler, also BUILD_C_INT_HANDLERS (as opposed to BUILD_LUA_INT_HANDLERS).
- Added tmr.set_match_int function that sets a match interrupt on a timer (one-shot or cyclic). Also works on virtual timers. In fact, it currently works only on virtual timers, as none of the platforms have support for this operation with hardware timers.
-Added more interrupt support functions in the CPU module.
All of the above were implemented and tested on the ELUA-PUC board, and nothing else. As a side effect, THIS COMMIT BRAKES THE STR912 PORT! The port will be modified to take advantage of the new interrupt structure soon; until then, please don't update it.
- enable file creation, reading, writing on mbed for the built-in filesystem
- implementation currently lacks support for directory listings, this will be
added when mbed implementation details are available.
Note: this should work with other ARM arm ports that are connected to a JTAG
debugger that implements semihosting, though I have not tested it.
- Main menu refactored to reduce info levels. Old "tutorials" are now part
of the "More Information" (which already contained tutorials) on eLua
Internals
- Shell help command adapted to rw filesystems addition (ls lists all files
of all filesystems)
- Minor order and name changes on main menu sub-items
- Minor refinements in some doc pages
- FAT changed to support the new opendir/readdir/closedir mechanism, and to use lseek directly instead of ioctl (also fixed a bug in FAT's lseek that always returned 0 instead of file position).
- ET-STM32 console moved to UART2@19200bps (to allow RFS to run on UART0). If UART0 is needee for console, remember to disable RFS.
- freed 700+ bytes of RAM by changing the devman implementation to keep pointers instead of actual DM_DEVICE structures
- other minor code changes and fixes
- added some more documentation (not yet done)
- alternate uarts can be selected (boot mode defaults to console uarts)
- renamed "remote" references to "rpc" (may as well keep the original name)
- switch default error handler to luaL_error (presumably wasn't available for
old 4.x LuaRPC)
- tweaks to exception handling to make things more consistent (hopefully)
- disabled by default (enable on a target-by-target basis) so it shouldn't
cause much breakage for non-rpc users
- some modifications to the binary chunk reader which should allow reading of
chunks encoded on various platforms (with certain limitations like lualong
can't read float lua bytecode, one must generate lualong bytecode from a float
lua)
- other misc changes.
- adc_wait_samples now returns the actual number of samples available at the
time it returns. this simplifies a pattern where one would wait on samples
if blocking and then subsequently check the number of available samples.
- adc.insertsamples(id, table, idx, count) function now available to take
samples and insert them into a table. this is slightly slower than
assignment for single values in a table, but can avoid having to use
getsamples (returning new tables) for certain situations
idx: starting index in table where values will be inserted
count: number of samples to get from channel id
of flash space.
NOTE: getsamples function is disabled since this is dependant on having a
buffer to get more than one sample.
Side note: single sampling without the buffer is faster by about 5-10
us/channel. It should be possible to sidestep the buffer in certain
situations for buffer enabled mode and get a similar benefit at the cost of
some additional complexity.
- ADC adjusted to work with sequenced acquisition setups. It should now
accomodate both sequenced and non-sequenced approaches on the backend.
A few more adjustments should be made to handle multiple sequencers
but right now neither LM3S or STM32 platforms use more than one sequencer.
- Added adcpoll.lua to demonstrate a simple approach for using clocked
acquisition and displaying results as they become available.
- ADC now works for STM32 (all 16 channels!). This should receive more
extensive testing, but everything should be working at this stage.
- the build system now pays attention to changes in header files meaning that
if any headers change or if the romfs changes (since it is generated as a
header) these changes will get recompiled without having to do a clean.