Private
Public Access
2
0

spi: mraa_spi_write_word can now return -1 in error cases

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2016-04-25 15:11:08 +01:00
parent b258867c37
commit c524c3d372
3 changed files with 6 additions and 6 deletions

View File

@@ -111,13 +111,13 @@ mraa_result_t mraa_spi_frequency(mraa_spi_context dev, int hz);
int mraa_spi_write(mraa_spi_context dev, uint8_t data);
/**
*Write Two Bytes to the SPI device.
* Write Two Bytes to the SPI device.
*
* @param dev The Spi context
* @param data Data to send
* @return Data received on the miso line
*/
uint16_t mraa_spi_write_word(mraa_spi_context dev, uint16_t data);
int mraa_spi_write_word(mraa_spi_context dev, uint16_t data);
/**
* Write Buffer of bytes to the SPI device. The pointer return has to be

View File

@@ -127,9 +127,9 @@ class Spi
* Write single byte to the SPI device
*
* @param data the byte to send
* @return data received on the miso line
* @return data received on the miso line or -1 in case of error
*/
uint16_t
int
write_word(uint16_t data)
{
return mraa_spi_write_word(m_spi, (uint16_t) data);