spi.hpp: remove transfer command from SWIG APIs
authorBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 18 Nov 2014 15:57:47 +0000 (15:57 +0000)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Thu, 20 Nov 2014 12:03:31 +0000 (12:03 +0000)
Transfer command works with a uint8_t buffer that is written into, this does
not work in SWIG APIs and will cause a copy in either case, so the API call is
not useful. Remove to stop confusion.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
api/mraa/spi.hpp

index 520698e..8bea35f 100644 (file)
@@ -95,6 +95,7 @@ class Spi {
         char* write(char* data, size_t length) {
             return (char*) mraa_spi_write_buf(m_spi, (uint8_t *) data, (int) length);
         }
+#ifndef SWIG
         /**
          * Transfer data to and from SPI device Receive pointer may be null if return
          * data is not needed.
@@ -107,6 +108,7 @@ class Spi {
         mraa_result_t transfer(char* data, char* rxBuf, size_t length) {
             return mraa_spi_transfer_buf(m_spi, (uint8_t *) data, (uint8_t *)rxBuf, (int) length);
         }
+#endif
         /**
          * Change the SPI lsb mode
          *