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.
Diff: SPISlave_multiByte.h
- Revision:
- 2:c520d7c7739d
- Parent:
- 0:b7415ae44dac
diff -r 58f0712d9aa2 -r c520d7c7739d SPISlave_multiByte.h
--- a/SPISlave_multiByte.h Wed May 31 07:39:37 2017 +0000
+++ b/SPISlave_multiByte.h Wed May 31 09:30:53 2017 +0000
@@ -89,11 +89,13 @@
/** Polls the SPI to see if data has been received
*
+ * @param bytes Number of bytes per SPI frame
+ *
* @returns
* 0 if no data,
* 1 otherwise
*/
- int receive(void);
+ int receive(int bytes = 1);
/** Retrieve data from receive buffer as slave
*
@@ -105,9 +107,10 @@
/** Fill the transmission buffer with the value to be written out
* as slave on the next received message from the master.
*
- * @param value the data to be transmitted next
+ * @param value the data context to be transmitted next
+ * @param bytes Number of bytes of given value
*/
- void reply(int value);
+ void reply(uint8_t *value, int bytes);
protected:
spi_mb_t _spi;