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:
- 1:58f0712d9aa2
- Parent:
- 0:b7415ae44dac
- Child:
- 2:c520d7c7739d
--- a/spi_api_multibyte.c Wed May 24 10:17:56 2017 +0000
+++ b/spi_api_multibyte.c Wed May 31 07:39:37 2017 +0000
@@ -80,7 +80,8 @@
#endif
} spi_info_t;
- #define TEST_STRING "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" //Tsungta, handle 32 bytes per SPI CS cycle
+// #define TEST_STRING "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" //Tsungta, handle 32 bytes per SPI CS cycle
+ #define TEST_STRING "012" //Tsungta, handle 32 bytes per SPI CS cycle
uint8_t m_tx_buf[] = TEST_STRING; /**< TX buffer. */
uint8_t m_rx_buf[sizeof(TEST_STRING)+1]; /**< RX buffer. */
const uint8_t m_length = sizeof(m_tx_buf); /**< Transfer length. */
@@ -187,7 +188,8 @@
if (event.evt_type == NRF_DRV_SPIS_XFER_DONE) {
// Signal that there is some data received that could be read.
- p_spi_info->flag.readable = true;
+ if(event.rx_amount == 3)//Tsungta
+ p_spi_info->flag.readable = true;
// And prepare for the next transfer.
// Previous data set in 'spi_slave_write' (if any) has been transmitted,
