diff --git a/api/maa/gpio.hpp b/api/maa/gpio.hpp index bc2a513..e538268 100644 --- a/api/maa/gpio.hpp +++ b/api/maa/gpio.hpp @@ -127,7 +127,7 @@ class Gpio { * * @return Result of operation */ - maa_result_t isr_exit() { + maa_result_t isrExit() { return maa_gpio_isr_exit(m_gpio); } /** diff --git a/api/maa/i2c.hpp b/api/maa/i2c.hpp index eab6268..c971662 100644 --- a/api/maa/i2c.hpp +++ b/api/maa/i2c.hpp @@ -85,7 +85,7 @@ class I2c { * * @return Char read from the bus */ - unsigned char read_byte() { + unsigned char readByte() { return (unsigned char) maa_i2c_read_byte(m_i2c); } /** @@ -127,7 +127,7 @@ class I2c { * @param data The byte to send on the bus * @return Result of operation */ - maa_result_t write_byte(const unsigned char data) { + maa_result_t write(const unsigned char data) { return maa_i2c_write_byte(m_i2c, data); } private: diff --git a/api/maa/spi.hpp b/api/maa/spi.hpp index a2cc9e9..1d45567 100644 --- a/api/maa/spi.hpp +++ b/api/maa/spi.hpp @@ -85,7 +85,7 @@ 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_buf(uint8_t* data, int length) { + unsigned char* write(uint8_t* data, int length) { return (unsigned char*) maa_spi_write_buf(m_spi, data, length); } /** @@ -103,7 +103,7 @@ class Spi { * @param bits bits per word * @return Result of operation */ - maa_result_t bit_per_word(unsigned int bits) { + maa_result_t bitPerWord(unsigned int bits) { return maa_spi_bit_per_word(m_spi, bits); } private: diff --git a/examples/c++/I2c-compass.cpp b/examples/c++/I2c-compass.cpp index 84fb83b..f980648 100644 --- a/examples/c++/I2c-compass.cpp +++ b/examples/c++/I2c-compass.cpp @@ -116,7 +116,7 @@ int main () while (running == 0) { i2c->address(HMC5883L_I2C_ADDR); - i2c->write_byte(HMC5883L_DATA_REG); + i2c->write(HMC5883L_DATA_REG); i2c->address(HMC5883L_I2C_ADDR); i2c->read(rx_tx_buf, DATA_REG_SIZE); diff --git a/examples/c++/Spi-pot.cpp b/examples/c++/Spi-pot.cpp index 878bdad..53e7855 100644 --- a/examples/c++/Spi-pot.cpp +++ b/examples/c++/Spi-pot.cpp @@ -54,14 +54,14 @@ int main () int i; for (i = 90; i < 130; i++) { data[1] = i; - recv = spi->write_buf(data, 2); + recv = spi->write(data, 2); printf("Writing -%i",i); printf("RECIVED-%i-%i\n",recv[0],recv[1]); usleep(100000); } for (i = 130; i > 90; i--) { data[1] = i; - recv = spi->write_buf(data, 2); + recv = spi->write(data, 2); printf("Writing -%i",i); printf("RECIVED-%i-%i\n",recv[0],recv[1]); usleep(100000);