Including SPI 3-wires class

Fork of X_NUCLEO_COMMON_SPI3W by Licio Mapelli

Revision:
17:99d103ca04dd
Parent:
15:a59f32439f9d
Child:
18:06322fe82f27
--- a/DevSPI/DevSPI.h	Fri Feb 19 09:33:04 2016 +0100
+++ b/DevSPI/DevSPI.h	Wed Jun 08 11:55:20 2016 +0200
@@ -108,7 +108,7 @@
      * @note       When using the SPI in Interrupt-mode, remember to disable interrupts
      *             before calling this function and to enable them again after.
      */
-    int spi_write(uint8_t* pBuffer, DigitalOut ssel, uint16_t NumBytesToWrite)
+    int spi_write(uint8_t* pBuffer, DigitalOut &ssel, uint16_t NumBytesToWrite)
     {
 	/* Check data format */
 	if(_bits != 8) return -1;
@@ -138,7 +138,7 @@
      * @note       When using the SPI in Interrupt-mode, remember to disable interrupts
      *             before calling this function and to enable them again after.
      */
-    int spi_read(uint8_t* pBuffer, DigitalOut ssel, uint16_t NumBytesToRead)
+    int spi_read(uint8_t* pBuffer, DigitalOut &ssel, uint16_t NumBytesToRead)
     {
 	/* Check data format */
 	if(_bits != 8) return -1;
@@ -169,7 +169,7 @@
      * @note       When using the SPI in Interrupt-mode, remember to disable interrupts
      *             before calling this function and to enable them again after.
      */
-    int spi_read_write(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, DigitalOut ssel, uint16_t NumBytes)
+    int spi_read_write(uint8_t* pBufferToRead, uint8_t* pBufferToWrite, DigitalOut &ssel, uint16_t NumBytes)
     {
 	/* Check data format */
 	if(_bits != 8) return -1;
@@ -201,7 +201,7 @@
      * @note       In order to guarantee this method to work correctly you have to
      *             pass buffers which are correctly aligned.
      */
-    int spi_write(uint16_t* pBuffer, DigitalOut ssel, uint16_t NumValuesToWrite)
+    int spi_write(uint16_t* pBuffer, DigitalOut &ssel, uint16_t NumValuesToWrite)
     {
 	/* Check data format */
 	if(_bits != 16) return -1;
@@ -233,7 +233,7 @@
      * @note       In order to guarantee this method to work correctly you have to
      *             pass buffers which are correctly aligned.
      */
-    int spi_read(uint16_t* pBuffer, DigitalOut ssel, uint16_t NumValuesToRead)
+    int spi_read(uint16_t* pBuffer, DigitalOut &ssel, uint16_t NumValuesToRead)
     {
 	/* Check data format */
 	if(_bits != 16) return -1;
@@ -266,7 +266,7 @@
      * @note       In order to guarantee this method to work correctly you have to
      *             pass buffers which are correctly aligned.
      */
-    int spi_read_write(uint16_t* pBufferToRead, uint16_t* pBufferToWrite, DigitalOut ssel, uint16_t NumValues)
+    int spi_read_write(uint16_t* pBufferToRead, uint16_t* pBufferToWrite, DigitalOut &ssel, uint16_t NumValues)
     {
 	/* Check data format */
 	if(_bits != 16) return -1;