spi_get_module() returns the SPIName unique identifier to the peripheral associated to this SPI channel - Verified by spi_test_get_module()spi_get_capabilities() fills the given spi_capabilities_t instance - Verified by spi_test_get_capabilities()spi_get_capabilities() should consider the ssel pin when evaluation the support_slave_mode capability If the given ssel pin cannot be managed by hardware in slave mode, support_slave_mode should be false - Verified by spi_test_get_capabilities() and fpga_spi_test_capabilities_ssel()spi_init() initializes the pins leaving the configuration registers unchanged - Not testable.spi_init() if is_slave is false:ssel is NC the hal implementation ignores this pin - Verified by spi_test_init_free(), fpga_spi_master_test_init_free() and fpga_spi_master_test_common()ssel is not NC then the hal implementation owns the pin and its management - Verified by spi_test_init_free(), fpga_spi_master_test_init_free() and fpga_spi_master_test_common()ssel is always considered active low - Verified by fpga_spi_master_test_common()miso (exclusive) or mosi is missing in any function that expects pins, the bus is assumed to be half-duplex - Verified by spi_test_init_free(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_free() resets the pins to their default state - Verified by spi_test_init_free(), fpga_spi_master_test_init_free() and fpga_spi_slave_test_init_free()spi_free() disables the peripheral clock - Not testablespi_format() sets:spi_format() updates the configuration of the peripheral except the baud rate generator - Verified by spi_test_set_format(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_frequency() sets the frequency to use during the transfer - Verified by spi_test_set_frequency(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_frequency() returns the actual frequency that will be used - Verified by spi_test_set_frequency() and fpga_spi_master_test_freq()spi_frequency() updates the baud rate generator leaving other configurations unchanged - Verified by fpga_spi_master_test_common()spi_transfer() :tx_len symbols to the bus - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()rx_len symbols from the bus - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()rx is NULL then inputs are discarded - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()tx is NULL then fill_symbol is used instead - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()rx_len > tx_len then it sends (rx_len-tx_len) additional fill_symbol to the bus - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer() sends tx_len symbols and then reads rx_len symbols - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer() receives rx_len symbols and then sends tx_len symbols - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transter_async() schedules a transfer to be process the same way spi_transfer() would have but asynchronously with the following exceptions: - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transter_async() returns immediately with a boolean indicating whether the transfer was successfully scheduled or not - Verified by spi_test_transfer_master_async(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer_async() is invoked when the transfer completes (with a success or an error) - Verified by fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer_async() saves the handler and the ctx pointer - Verified by spi_test_transfer_master_async(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()ctx is passed to the callback on transfer completion - Verified by spi_test_transfer_master_async(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer_async() function may use the DMAUsage hint to select the appropriate async algorithm - Verified by spi_test_transfer_master_async()spi_async_event_t must be filled with the number of symbol clocked on the bus during this transfer and a boolean value indicated if an error has occurred - Verified by spi_test_transfer_master_async(), fpga_spi_master_test_common() and fpga_spi_slave_test_common()spi_transfer_async_abort() aborts an on-going async transfer - Verified by spi_test_transfer_master_async_abort()spi_init() multiple times on the same spi_t without spi_free()'ing it first.spi_init() on a non-initialized or freed spi_t.miso and mosi as NC to spi_get_module or spi_init.miso or mosi as NC on target that does not support half-duplex mode.mclk as NC to spi_get_module or spi_init.cap to spi_get_capabilities.obj to any method.ssel pin to spi_init() when using in master mode. SS must be managed by hardware in slave mode and must NOT be managed by hardware in master mode.spi_get_capabilities().bits in spi_format to a value out of the range given by spi_get_capabilities().fill_symbol to spi_transfer and spi_transfer_async while they would be required by the transfer (rx_len != tx_len or tx==NULL).handler to spi_transfer_async.spi_transfer_async_abort() while no async transfer is being processed (no transfer or a synchronous transfer).spi_init() but before both the frequency and format have been set with spi_frequency() and spi_format()