spi: update spi module to use char instead of unsigned char as return values
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -75,8 +75,8 @@ class Spi {
|
||||
* @param data the byte to send
|
||||
* @return data received on the miso line
|
||||
*/
|
||||
unsigned char write(char data) {
|
||||
return (unsigned char) mraa_spi_write(m_spi, (uint8_t) data);
|
||||
char write(char data) {
|
||||
return (char) mraa_spi_write(m_spi, (uint8_t) data);
|
||||
}
|
||||
/**
|
||||
* Write buffer of bytes to SPI device
|
||||
@@ -85,8 +85,8 @@ class Spi {
|
||||
* @param length size of buffer to send
|
||||
* @return char* data received on the miso line. Same length as passed in
|
||||
*/
|
||||
unsigned char* write(char* data, size_t length) {
|
||||
return (unsigned char*) mraa_spi_write_buf(m_spi, (uint8_t *) data, (int) length);
|
||||
char* write(char* data, size_t length) {
|
||||
return (char*) mraa_spi_write_buf(m_spi, (uint8_t *) data, (int) length);
|
||||
}
|
||||
/**
|
||||
* Change the SPI lsb mode
|
||||
|
||||
@@ -48,8 +48,8 @@ int main ()
|
||||
|
||||
spi = new mraa::Spi(0);
|
||||
|
||||
uint8_t data[] = {0x00, 100};
|
||||
uint8_t *recv;
|
||||
char data[] = {0x00, 100};
|
||||
char *recv;
|
||||
while (running == 0) {
|
||||
int i;
|
||||
for (i = 90; i < 130; i++) {
|
||||
|
||||
Reference in New Issue
Block a user