spi
Actual_clock = spi.setup( id,
spi.MASTER | spi.SLAVE, clock, cpol, cpha,
databits):
set the SPI interface with the given parameters, returns the clock
that
was set for the interface.
spi.select(
id
): sets the selected spi as active (sets the SS line of the given
interface).
spi.unselect(
id ): clears the SS line of the given interface.
spi.send(
id, Data1, Data2, ... ): sends all the data to the specified SPI
interface.
[spi.sendrecv(id,
Out1, Out2, ...)]
In1,
In2, ... = spi.send_recv( id, Out1, Out2, ... ): sends all the "out"
bytes to
the specified SPI interface and returts the data read after each sent
byte.
Returning
several values in this blocking way would not complicate some queued
send implementations ? (ok, this could be another function :)
Sending multiple data/chars in a single
call and not in
a table argument does not allow the data to be built in run time
(without some string massage, of course :)