I/O setup.
- the pd() module has a new method (board) and gets it CPU, platform and board name directly from the build system (command line macros). It's much easier to work like this.
- the samples (examples/) were updated to check pd.board() rather than pd.platform()/pd.cpu(), which is a much more logical way to do things, since it ties the sample to a
specific I/O configuration, not with a CPU.
- updated PWM code for AT91SAM7X, now the "piano" example works for both LM3Sxxxx and AT91SAM7X256.
- added 3 new methods to the PIO module: pullup(), pulldown(), ad nopullup(), their meaning is obvious.
- new shell command: mem
- new module: bit (for bit operations)
- removed UARTx, TMRx, SPIx, PWMx constants from the respectives modules, as they only waste memory space. But now the same
modules will return an error (via luaL_error) if an invalid resource ID is used. Note that this does not apply to PIO, since
PIO uses special encodings for ports/pins.
- new methods in pio: port and pin to return the port/pin encoded in a pio value.
LPC2888 board. The allocator used is dlmalloc, just as in Newlib, but it's a
newer version than can handle non-contiguous memory spaces (2.8.3, as opposed
to 2.6.4 in Newlib 1.16.0, I really have no idea why they're using such an
ancient version of dlmalloc). To use it add "allocator=multiple" to your scons
command line (default for LPC2888).
This takes care of my LPC2888 board (any many other board out there)
that have RAM both on the CPU itself and on a separate chip.
To use it add "allocator=tlsf" to your scons build command.
Even though the code for all the platform was modified, the new code
should not modify the "old" allocator behaviour.
Also added a new "mem" command to the shell, it gives information about
the current RAM state (total, used, free).
NOT YET TESTED !!! So use with care.