Sorry, I commited a wrong test file.
wb_build.lua now supports the logo_onclick_link parameter, of wb_usr.lua
It defines an URL to be opened in a blank target windows.
Helpfull to bring navigation back to a "homepage".
- removed getsmoothing, setfreerunning, samplesready
- isdone has returned so that one can check if the reason why the buffer is
dry is because no more samples are being collected
- smoothing should support fairly large lengths now (as long as you have the
memory)
- added support to adc.sample to take a table as the first argument so that a
set of channels can be started at closer to the same time.
example:
adcchannels = {0,1,2,3}
adc.sample(adcchannels,8)
this should collect samples on all 4 channels starting nearly at the same
time.
- more comments added to elua_adc.c to describe behavior.
Misc
- remove rndpow2, not being used
platdependent.html file no more needed (all content in refman.html)
pre style css edited to correct disp.draw memory layout table
Minor corrections on refman (disp module only)
other files rebuilt by webbook
- The Eagle 100 binary image now starts at 0x2000 by default (instead of the regular 0x0) to allow users to take advantage of the provided Ethernet bootloader.
- deleted the old docs/ directory. The "real" documentation is in the doc/ directory
- "building" page completely rewritten
- a new page about the toolchains used in eLua
- a graphical representation of the system architecture (doc/wb_img/elua_arch.png) that will be used in a soon to come page about the eLua architecture
Also:
- validate.h updated with some new tests (still needs more work)
- "arm-gcc-eabi" toolchain name changed to "codesourcery", since this is obviously way more intuitive :)
improved.
If someone else has been editing this doc elsewhere, I can merge your changes
if you like. I wanted to update the ADC docs, but wanted to clear out the
MS Word formatting first :-)
This commit includes NO TEXTUAL EDITS. I did this intentionally because it
would otherwise be difficult to figure out what content has changed from diffs
alone.
is full). Clock and sampling frequency have been moved to a separate function
from burst. There is now one function to initiate sampling called sample
which takes a channel and count. setclock takes a channel, clock_id, and
frequency. Adjustments should be made to make channel groupings somewhat
cleaner, but this is functional.
Suggestions are welcome for simplification :-)
I'll try and make some doc updates in the coming day or so to reflect
finalized adjustments.
$ scons board=... toolchain=arm-gcc|arm-gcc-eabi
(the default is still arm-gcc, but this can be changed by editing SConstruct).
This is a Very Good thing for us, because users won't need to build their own toolchains anymore, they can just download the one from CS and use it. Thanks again for this.
Actually, the whole build system was changed to support arbitrary toolchains (although there's much work to be done in this area).
Also, changed a few things in the STM32 port (the linker script file, the stack definitions).
And other (very minor) changes (mostly to fix some compiler warnings).
SConstruct edited just to leave group/files definitions close to the platform/groups.
Doc content files mirroed to pt, to ease the portuguese version initial migration
ADC:
- getsamples split into getsamples and getsample. getsamples always returns a
table of results. getsample returns single values (if available).
EABI compiler support:
- added a parameter to SConstruct called cprefix, which allows one to define a
prefix other than the arm-elf used by some platforms. Currently the only
platform that does anything with this parameter is LM3S, conf.py scripts can
be updated to handle the default toolchain prefix, and accommodate alternate
ones if needed.
- Added sections to lm3s.ld (originally committed by Jesus Alvarez) to handle
linking properly for arm-eabi targets.
Recommended only for systems with very low memory (Flash/RAM), and prefferably systems running only precompiled Lua (if you need to compile the code, you might get into stack overflows, and this allocator is much more sensitive to this kind of stuff than dlmalloc()). In fact, this allocator seems to suggest that one should set the stack to at least 4k for the Lua parser to run properly even on small programs. I won't do this just yet, rather I'll keep on trying to move the Lua parser data structures from stack to heap. For now we're OK with the current configuration.
The allocator can handle multiple memory spaces.
Enable with "allocator=simple" on the scons command line.
...oh yes, also added a newline to the end of elua_adc.c :) (to avoid some annoying warnings)
for me as memcpy did.
Check out inc/utils.h, since this Duff's device is implemented as a macro
which could be used for unrolling other loops selectively.
- new addition to the PIO module: now you can use pin ranges in PIO expressions. For example:
gpio.PA_3_6_DIR = gpio.OUTPUT -- make pins 3-6 from PORTA outputs
gpio.PB_0_30_PULL = gpio.PULLUP -- activate pullups on all but the last pin of PORTB
gpio.PB_3_6 = 11 -- set value 10 (1011) to pins 3-6 of PB (so PB.6 == 1, PB.5 == 0, PB.4 == 1, PB.3 == 1 )
value = gpio.PB_2_9 -- read the value of pins 2-9 of PB into 'value'
Of course, one can still specify a single pin instead of a range.
This is still tested, but seems to work fine for now.
- romfs/ samples updated to work with the new module name and syntax
- small fix to buf.c (in the BUF_MOD_INCR macro).
- New parameters in wb_usr to specify:
- logo image file name
- search box visibility
- search box title and label
- vertical size of title bar (for bigger logos)
Features changed in WebBook HTML generator:
- copywrite notice now optional
- mail contact now optional
- UTF-8 used for Portuguese version
- search box now has a separate template to allow positioning flexibility
HTML Templates enhanced
Ongoing work....
buf.c.
The smoothing buffer is still kept separate from the main buffering system,
but as samples come in via interrupt, they are placed into a "standard" elua
buf. The size of this buf is configured according to whether one is grabbing
a bunch of samples rapidly (burst), or singly in order to accommodate the
expected number of incoming samples. If smoothing is enabled, incoming
samples are claimed until the smoothing buffer is full, and then remaining
samples are left in the main buffer until they are collected. This means that
whether one is collecting single samples or samples at burst rate, and
smoothing is enabled, the filter will only be providing samples that have
enough history.
Added a function to manually flush both smoothing and main buffers.
This would be useful if you know your state has changed and you only want
fresh samples that are going to be collected after a flush.
Also, a lot of functionality moved into elua_adc.c and common.c
(boundaries for what belongs where, might be evaluated), reducing the number
of platform.c specific functions dramatically.
Basic functionality seems to be working, but some more testing should be done.
Also, given that there's now a dynamic buffer behind everything, a shift in
the way sampling is handled could be done:
sample and burst functions could be made to be non-blocking, and to never
return anything except for errors.
a separate getsamples function could be used for removing samples collected by
either function from the buffer.
Suggestions are welcome as it would be nice to keep usage paradigms stable
after the 0.6 release.