SPI (using member functions)
SPI access (using member functions)
After initializing the hardware by the begin()
method, the bus can be read and written by beginTransaction()
. Executing beginTransaction()
selects the SPI select pin. Read/write is done with the transfer()
function; SPI reads and writes at the same time.
beginTransaction()
Starts the use of the bus; sets the SPI select pin.
If called with the settings
parameter given, the bus is set.
endTransaction()
Terminates the use of the bus; releases the SPI select pin.
transfer(), transfer16(), transfer32()
Reads and writes the bus. transfer()
transfers 8 bits, transfer16()
transfers 16 bits, and transfer32()
transfers 32 bits.
最終更新