Skip to content

Commit 1326a41

Browse files
committed
tests: spi_loopback: Remove null rx buffers
Substitute null rx buffers with dummy rx buffers. Signed-off-by: Yannis Damigos <[email protected]>
1 parent 0c0d35a commit 1326a41

File tree

1 file changed

+5
-3
lines changed
  • tests/drivers/spi/spi_loopback/src

1 file changed

+5
-3
lines changed

tests/drivers/spi/spi_loopback/src/spi.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,10 @@ static int spi_rx_half_end(struct spi_config *spi_conf)
225225
.len = BUF_SIZE,
226226
},
227227
};
228+
u8_t dummy_rx_buf[8] = {};
228229
struct spi_buf rx_bufs[] = {
229230
{
230-
.buf = NULL,
231+
.buf = dummy_rx_buf,
231232
.len = 8,
232233
},
233234
{
@@ -271,17 +272,18 @@ static int spi_rx_every_4(struct spi_config *spi_conf)
271272
.len = BUF_SIZE,
272273
},
273274
};
275+
u8_t dummy_rx_buf[4] = {};
274276
struct spi_buf rx_bufs[] = {
275277
{
276-
.buf = NULL,
278+
.buf = dummy_rx_buf,
277279
.len = 4,
278280
},
279281
{
280282
.buf = buffer_rx,
281283
.len = 4,
282284
},
283285
{
284-
.buf = NULL,
286+
.buf = dummy_rx_buf,
285287
.len = 4,
286288
},
287289
{

0 commit comments

Comments
 (0)