SPI facilities are defined in the
include/picolibrary/spi.h/source/picolibrary/spi.cc
header/source file pair.
The ::picolibrary::SPI::Basic_Controller_Concept concept class defines the expected
interface of an SPI basic controller.
initialize() member function.configure() member function.exchange()
member function.The ::picolibrary::Testing::Automated::SPI::Mock_Basic_Controller mock SPI basic
controller class is available if the PICOLIBRARY_ENABLE_AUTOMATED_TESTING project
configuration option is ON.
The mock is defined in the
include/picolibrary/testing/automated/spi.h/source/picolibrary/testing/automated/spi.cc
header/source file pair.
The ::picolibrary::SPI::Controller_Concept concept class defines the expected interface
of an SPI controller.
initialize()
member function.configure()
member function.exchange() member
functions.receive() member
functions.transmit() member
functions.To add SPI controller functionality to an SPI basic controller implementation, use the
::picolibrary::SPI::Controller template class.
::picolibrary::SPI::Controller automated tests are defined in the
test/automated/picolibrary/spi/controller/main.cc
source file.
The ::picolibrary::Testing::Automated::SPI::Mock_Controller mock SPI controller class is
available if the PICOLIBRARY_ENABLE_AUTOMATED_TESTING project configuration option is
ON.
The mock is defined in the
include/picolibrary/testing/automated/spi.h/source/picolibrary/testing/automated/spi.cc
header/source file pair.
The ::picolibrary::Testing::Interactive::SPI::echo() interactive test helper is
available if the PICOLIBRARY_ENABLE_INTERACTIVE_TESTING project configuration option is
ON.
The interactive test helper is defined in the
include/picolibrary/testing/interactive/spi.h/source/picolibrary/testing/interactive/spi.cc
header/source file pair.
The ::picolibrary::SPI::Device_Selector_Concept concept class defines the expected
interface of an SPI device selector.
initialize() member function.select() member function.deselect() member
function.The ::picolibrary::SPI::GPIO_Output_Pin_Device_Selector template class is a GPIO output
pin based SPI device selector implementation.
::picolibrary::SPI::GPIO_Output_Pin_Device_Selector automated tests are defined in the
test/automated/picolibrary/spi/gpio_output_pin_device_selector/main.cc
source file.
The ::picolibrary::Testing::Automated::SPI::Mock_Device_Selector mock SPI device
selector class is available if the PICOLIBRARY_ENABLE_AUTOMATED_TESTING project
configuration option is ON.
The mock is defined in the
include/picolibrary/testing/automated/spi.h/source/picolibrary/testing/automated/spi.cc
header/source file pair.
To ensure that SPI devices are deselected, use the
::picolibrary::SPI::Device_Selection_Guard RAII device selection guard template class to
select and deselect devices.
::picolibrary::SPI::Device_Selection_Guard automated tests are defined in the
test/automated/picolibrary/spi/device_selection_guard/main.cc
source file.
The ::picolibrary::SPI::Device template class implements low level functionality for
interacting with an SPI device.
::picolibrary::SPI::Device::initialize() member function.::picolibrary::SPI::Device::configure() member function.::picolibrary::SPI::Device::device_selector() member function.::picolibrary::SPI::Device::exchange() member functions.::picolibrary::SPI::Device::receive() member functions.::picolibrary::SPI::Device::transmit() member functions.::picolibrary::SPI::Device automated tests are defined in the
test/automated/picolibrary/spi/device/main.cc
source file.
The ::picolibrary::Testing::Automated::SPI::Mock_Device mock SPI device class is
available if the PICOLIBRARY_ENABLE_AUTOMATED_TESTING project configuration option is
ON.
The mock is defined in the
include/picolibrary/testing/automated/spi.h/source/picolibrary/testing/automated/spi.cc
header/source file pair.