* @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
* @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
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++) {