From e9de25d7973a4da10b1959081fa6ea2adfa39cbe Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Tue, 18 Nov 2014 15:57:47 +0000 Subject: [PATCH] spi.hpp: remove transfer command from SWIG APIs 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 --- api/mraa/spi.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/mraa/spi.hpp b/api/mraa/spi.hpp index 520698e..8bea35f 100644 --- a/api/mraa/spi.hpp +++ b/api/mraa/spi.hpp @@ -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 *