File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
tests/drivers/spi/spi_loopback/src Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,30 @@ ZTEST(spi_loopback, test_spi_complete_large_transfers)
321
321
"Large Buffer contents are different" );
322
322
}
323
323
324
+ ZTEST (spi_loopback , test_spi_null_tx_buf_set )
325
+ {
326
+ struct spi_dt_spec * spec = loopback_specs [spec_idx ];
327
+ static const uint8_t expected_nop_return_buf [BUF_SIZE ] = { 0 };
328
+ const struct spi_buf_set rx = spi_loopback_setup_xfer (rx_bufs_pool , 1 ,
329
+ buffer_rx , BUF_SIZE );
330
+
331
+ (void )memset (buffer_rx , 0x77 , BUF_SIZE );
332
+
333
+ spi_loopback_transceive (spec , NULL , & rx );
334
+
335
+ spi_loopback_compare_bufs (expected_nop_return_buf , buffer_rx , BUF_SIZE ,
336
+ buffer_print_rx , buffer_print_rx );
337
+ }
338
+
339
+ ZTEST (spi_loopback , test_spi_null_rx_buf_set )
340
+ {
341
+ struct spi_dt_spec * spec = loopback_specs [spec_idx ];
342
+ const struct spi_buf_set tx = spi_loopback_setup_xfer (tx_bufs_pool , 1 ,
343
+ NULL , BUF_SIZE );
344
+
345
+ spi_loopback_transceive (spec , & tx , NULL );
346
+ }
347
+
324
348
ZTEST (spi_loopback , test_nop_nil_bufs )
325
349
{
326
350
struct spi_dt_spec * spec = loopback_specs [spec_idx ];
You can’t perform that action at this time.
0 commit comments