Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed_SPIS_multiByte_example_SOG by
Diff: spi_api_multibyte.c
- Revision:
- 6:bce37a45b9cb
- Parent:
- 5:6a1155885fc9
--- a/spi_api_multibyte.c Tue Jun 13 04:34:01 2017 +0000
+++ b/spi_api_multibyte.c Tue Jun 13 12:46:50 2017 +0000
@@ -62,7 +62,7 @@
static uint8_t m_tx_buf[] = TEST_STRING; /**< TX buffer. */
static uint8_t m_rx_buf[sizeof(TEST_STRING) + 1]; /**< RX buffer. */
static uint8_t m_length = sizeof(m_tx_buf); /**< Transfer length. */
-
+static uint8_t tx_m_length = 1; /**< RX length. */
typedef struct {
bool initialized;
@@ -381,7 +381,7 @@
// Prepare the slave for transfer.
//m_tx_buf = NRF_DRV_SPIS_DEFAULT_ORC;
nrf_drv_spis_buffers_set(SLAVE_INST(obj),
- m_tx_buf, m_length, m_rx_buf, m_length);
+ m_tx_buf, tx_m_length, m_rx_buf, m_length);
}
}
@@ -470,7 +470,7 @@
p_spi_info->flag.readable = false;
nrf_drv_spis_buffers_set(SLAVE_INST(obj),
- m_tx_buf, m_length, m_rx_buf, m_length);
+ m_tx_buf, tx_m_length, m_rx_buf, m_length);
MBED_ASSERT(!p_spi_info->master);
/*
while (!p_spi_info->flag.readable) {
