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.
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.
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.
channel. Smoothing support (rolling average) has been added. adcscope has
been updated to reflect these changes, and show output from 4 channels at
once.
- fix for typo in stm32/platform.c