Private
Public Access
2
0

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 <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-11-18 15:57:47 +00:00
parent 7dc29aa3b7
commit e9de25d797

View 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
*