You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hal/spi_api.h
+33-33Lines changed: 33 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -97,40 +97,40 @@ extern "C" {
97
97
* # Defined behavior
98
98
* * ::spi_init initializes the spi_t control structure
99
99
* * ::spi_init configures the pins used by SPI - Verified by ::fpga_spi_test_init_free, ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
100
-
* * ::spi_get_capabilities() fills the given `spi_capabilities_t` instance
101
-
* * ::spi_get_capabilities() should consider the `ssel` pin when evaluation the `support_slave_mode` and `hw_cs_handle` capability
102
-
* * ::spi_get_capabilities(): if the given `ssel` pin cannot be managed by hardware, `support_slave_mode` and `hw_cs_handle` should be false
100
+
* * ::spi_get_capabilities() fills the given `spi_capabilities_t` instance - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
101
+
* * ::spi_get_capabilities() should consider the `ssel` pin when evaluation the `support_slave_mode` and `hw_cs_handle` capability - TBD (basic test)
102
+
* * ::spi_get_capabilities(): if the given `ssel` pin cannot be managed by hardware, `support_slave_mode` and `hw_cs_handle` should be false - TBD (basic test)
103
103
* * At least a symbol width of 8bit must be supported - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
104
-
* * The supported frequency range must include the range [0.2..2] MHz
105
-
* * ::spi_free returns the pins owned by the SPI object to their reset state
106
-
* * ::spi_format sets the number of bits per frame
107
-
* * ::spi_format configures clock polarity and phase
108
-
* * ::spi_format configures master/slave mode
109
-
* * ::spi_frequency sets the SPI baud rate
110
-
* * ::spi_master_write writes a symbol out in master mode and receives a symbol
111
-
* * ::spi_master_block_write writes `tx_length` words to the bus
112
-
* * ::spi_master_block_write reads `rx_length` words from the bus
113
-
* * ::spi_master_block_write returns the maximum of tx_length and rx_length
114
-
* * ::spi_master_block_write specifies the write_fill which is default data transmitted while performing a read
115
-
* * ::spi_get_module returns non-zero if a value is available to read from SPI channel, 0 otherwise
116
-
* * ::spi_slave_read returns a received value out of the SPI receive buffer in slave mode
117
-
* * ::spi_slave_read blocks until a value is available
118
-
* * ::spi_slave_write writes a value to the SPI peripheral in slave mode
119
-
* * ::spi_slave_write blocks until the SPI peripheral can be written to
120
-
* * ::spi_busy returns non-zero if the peripheral is currently transmitting, 0 otherwise
121
-
* * ::spi_master_transfer starts the SPI asynchronous transfer
122
-
* * ::spi_master_transfer writes `tx_len` words to the bus
123
-
* * ::spi_master_transfer reads `rx_len` words from the bus
124
-
* * ::spi_master_transfer specifies the bit width of buffer words
125
-
* * The callback given to ::spi_master_transfer is invoked when the transfer completes (with a success or an error)
126
-
* * ::spi_master_transfer specifies the logical OR of events to be registered
127
-
* * The ::spi_master_transfer function may use the `DMAUsage` hint to select the appropriate async algorithm
128
-
* * ::spi_irq_handler_asynch reads the received values out of the RX FIFO
129
-
* * ::spi_irq_handler_asynch writes values into the TX FIFO
130
-
* * ::spi_irq_handler_asynch checks for transfer termination conditions, such as buffer overflows or transfer complete
131
-
* * ::spi_irq_handler_asynch returns event flags if a transfer termination condition was met, otherwise 0
132
-
* * ::spi_abort_asynch aborts an on-going async transfer
133
-
* * ::spi_active returns non-zero if the SPI port is active or zero if it is not
104
+
* * The supported frequency range must include the range [0.2..2] MHz - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
105
+
* * ::spi_free returns the pins owned by the SPI object to their reset state - Verified by ::fpga_spi_test_init_free
106
+
* * ::spi_format sets the number of bits per frame - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
107
+
* * ::spi_format configures clock polarity and phase - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
108
+
* * ::spi_format configures master/slave mode - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common; slave mode - TBD
109
+
* * ::spi_frequency sets the SPI baud rate - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
110
+
* * ::spi_master_write writes a symbol out in master mode and receives a symbol - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
111
+
* * ::spi_master_block_write writes `tx_length` words to the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
112
+
* * ::spi_master_block_write reads `rx_length` words from the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
113
+
* * ::spi_master_block_write returns the maximum of tx_length and rx_length - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
114
+
* * ::spi_master_block_write specifies the write_fill which is default data transmitted while performing a read - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
115
+
* * ::spi_get_module returns the SPI module number - TBD (basic test)
116
+
* * ::spi_slave_read returns a received value out of the SPI receive buffer in slave mode - TBD (SPI slave test)
117
+
* * ::spi_slave_read blocks until a value is available - TBD (SPI slave test)
118
+
* * ::spi_slave_write writes a value to the SPI peripheral in slave mode - TBD (SPI slave test)
119
+
* * ::spi_slave_write blocks until the SPI peripheral can be written to - TBD (SPI slave test)
120
+
* * ::spi_busy returns non-zero if the peripheral is currently transmitting, 0 otherwise - TBD (basic test)
121
+
* * ::spi_master_transfer starts the SPI asynchronous transfer - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
122
+
* * ::spi_master_transfer writes `tx_len` words to the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
123
+
* * ::spi_master_transfer reads `rx_len` words from the bus - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
124
+
* * ::spi_master_transfer specifies the bit width of buffer words - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
125
+
* * The callback given to ::spi_master_transfer is invoked when the transfer completes (with a success or an error) - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
126
+
* * ::spi_master_transfer specifies the logical OR of events to be registered - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
127
+
* * The ::spi_master_transfer function may use the `DMAUsage` hint to select the appropriate async algorithm - Not testable
128
+
* * ::spi_irq_handler_asynch reads the received values out of the RX FIFO - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
129
+
* * ::spi_irq_handler_asynch writes values into the TX FIFO - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
130
+
* * ::spi_irq_handler_asynch checks for transfer termination conditions, such as buffer overflows or transfer complete - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
131
+
* * ::spi_irq_handler_asynch returns event flags if a transfer termination condition was met, otherwise 0 - Verified by ::fpga_spi_test_common_no_ss and ::fpga_spi_test_common
132
+
* * ::spi_abort_asynch aborts an on-going async transfer - TBD (basic test)
133
+
* * ::spi_active returns non-zero if the SPI port is active or zero if it is not - TBD (basic test)
134
134
*
135
135
* # Undefined behavior
136
136
* * Calling ::spi_init multiple times on the same `spi_t` without ::spi_free
0 commit comments