styling: remove trailing whitespace from all modules
authorBrendan Le Foll <brendan.le.foll@intel.com>
Mon, 2 Jun 2014 10:49:57 +0000 (11:49 +0100)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Mon, 2 Jun 2014 10:49:57 +0000 (11:49 +0100)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/4digitdisplay/tm1637.cxx
src/hmc5883l/hmc5883l.h
src/lcd/iiclcd.cxx
src/lcd/jhd1313m1.cxx
src/lcd/lcm1602.cxx
src/ledbar/my9221.cxx
src/nrf24l01/nrf24l01.cxx
src/nrf24l01/nrf24l01.h

index 1ddba1c..c703193 100644 (file)
@@ -94,12 +94,12 @@ TM1637::~TM1637() {
     }
 }
 
-maa_result_t 
+maa_result_t
 TM1637::setBrightness (uint8_t level) {
        m_brightness = level;
 }
 
-maa_result_t 
+maa_result_t
 TM1637::setSegments (const uint8_t segments[], uint8_t length, uint8_t pos) {
        start();
        writeByte(TM1637_I2C_COMM1);
@@ -117,7 +117,7 @@ TM1637::setSegments (const uint8_t segments[], uint8_t length, uint8_t pos) {
        stop();
 }
 
-maa_result_t 
+maa_result_t
 TM1637::write (std::string msg) {
        char leter = '\0';
        uint8_t data[] = { 0x0, 0x0, 0x0, 0x0 };
@@ -131,7 +131,7 @@ TM1637::write (std::string msg) {
        setSegments(data);
 }
 
-maa_result_t 
+maa_result_t
 TM1637::pinMode (maa_gpio_context ctx, gpio_dir_t mode) {
        maa_result_t error = MAA_SUCCESS;
        error = maa_gpio_dir(ctx, mode);
@@ -140,13 +140,13 @@ TM1637::pinMode (maa_gpio_context ctx, gpio_dir_t mode) {
     }
 }
 
-maa_result_t 
+maa_result_t
 TM1637::start() {
        pinMode (m_dataPinCtx, MAA_GPIO_OUT);
        usleep(PULSE_LENGTH);
 }
 
-maa_result_t 
+maa_result_t
 TM1637::stop() {
        pinMode (m_dataPinCtx, MAA_GPIO_OUT);
        usleep(PULSE_LENGTH);
@@ -156,7 +156,7 @@ TM1637::stop() {
        usleep(PULSE_LENGTH);
 }
 
-maa_result_t 
+maa_result_t
 TM1637::writeByte(uint8_t value) {
        for (uint8_t idx = 0; idx < 8; idx++) {
                pinMode(m_clkPinCtx, MAA_GPIO_OUT);
index fb76da3..ff1e616 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     /**
      * Updates the values by reading from i2c
-     * 
+     *
      * @return 0 for success
      */
     int update();
index 16e16c7..8eb2c54 100644 (file)
@@ -41,7 +41,7 @@ IICLcd::IICLcd (int bus, int lcdAddress) {
     }
 }
 
-maa_result_t 
+maa_result_t
 IICLcd::write (int row, int column, std::string msg) {
        setCursor (row, column);
        write (msg);
index cf24159..79dad8b 100644 (file)
@@ -53,8 +53,8 @@ Jhd1313m1::Jhd1313m1 (int bus, int lcdAddress, int rgbAddress) : IICLcd(bus, lcd
        clear ();
        usleep(4500);
        
-    cmd (m_i2c_lcd_control,    LCD_ENTRYMODESET | 
-                                                       LCD_ENTRYLEFT | 
+    cmd (m_i2c_lcd_control,    LCD_ENTRYMODESET |
+                                                       LCD_ENTRYLEFT |
                                                        LCD_ENTRYSHIFTDECREMENT);
 
        setReg (m_i2c_lcd_rgb, m_rgb_address, 0, 0);
@@ -88,26 +88,26 @@ Jhd1313m1::write (std::string msg) {
        return error;
 }
 
-maa_result_t 
+maa_result_t
 Jhd1313m1::setCursor (int row, int column) {
        maa_result_t error = MAA_SUCCESS;
 
        int row_addr[] = { 0x80, 0xc0, 0x14, 0x54};
        uint8_t offset = ((column % 16) + row_addr[row]);
 
-       uint8_t data[2] = { 0x80, offset }; 
+       uint8_t data[2] = { 0x80, offset };
        error = maa_i2c_address (m_i2c_lcd_control, m_lcd_control_address);
        error = maa_i2c_write (m_i2c_lcd_control, data, 2);
 
        return error;
 }
 
-maa_result_t 
+maa_result_t
 Jhd1313m1::clear () {
        return cmd (m_i2c_lcd_control, LCD_CLEARDISPLAY);
 }
 
-maa_result_t 
+maa_result_t
 Jhd1313m1::home () {
        return cmd (m_i2c_lcd_control, LCD_RETURNHOME);
 }
@@ -117,7 +117,7 @@ Jhd1313m1::home () {
  *  private area
  * **************
  */
-maa_result_t 
+maa_result_t
 Jhd1313m1::setReg (maa_i2c_context ctx, int deviceAdress, int addr, uint8_t value) {
        maa_result_t error = MAA_SUCCESS;
 
@@ -128,7 +128,7 @@ Jhd1313m1::setReg (maa_i2c_context ctx, int deviceAdress, int addr, uint8_t valu
        return error;
 }
 
-maa_result_t 
+maa_result_t
 Jhd1313m1::cmd (maa_i2c_context ctx, uint8_t value) {
        maa_result_t error = MAA_SUCCESS;
 
index cdf351d..a9f30c8 100644 (file)
@@ -78,7 +78,7 @@ Lcm1602::write (std::string msg) {
     return error;
 }
 
-maa_result_t 
+maa_result_t
 Lcm1602::setCursor (int row, int column) {
        maa_result_t error = MAA_SUCCESS;
 
@@ -88,12 +88,12 @@ Lcm1602::setCursor (int row, int column) {
        return send (LCD_SETDDRAMADDR | offset, 0);
 }
 
-maa_result_t 
+maa_result_t
 Lcm1602::clear () {
        return send(LCD_CLEARDISPLAY, 0);
 }
 
-maa_result_t 
+maa_result_t
 Lcm1602::home () {
        return send(LCD_RETURNHOME, 0);
 }
@@ -103,7 +103,7 @@ Lcm1602::home () {
  *  private area
  * **************
  */
-maa_result_t 
+maa_result_t
 Lcm1602::send (uint8_t value, int mode) {
        maa_result_t ret = MAA_SUCCESS;
     uint8_t h = value & 0xf0;
index 8575ba7..054858b 100644 (file)
@@ -71,7 +71,7 @@ MY9221::~MY9221() {
     }
 }
 
-maa_result_t 
+maa_result_t
 MY9221::setBarLevel (uint8_t level) {
        if (level > 10) {
                return MAA_ERROR_INVALID_PARAMETER;
@@ -85,7 +85,7 @@ MY9221::setBarLevel (uint8_t level) {
     lockData ();
 }
 
-maa_result_t 
+maa_result_t
 MY9221::lockData () {
        maa_result_t error = MAA_SUCCESS;
        error = maa_gpio_write (m_dataPinCtx, LOW);
@@ -97,7 +97,7 @@ MY9221::lockData () {
     }
 }
 
-maa_result_t 
+maa_result_t
 MY9221::send16bitBlock (short data) {
        maa_result_t error = MAA_SUCCESS;
        for (uint8_t bit_idx = 0; bit_idx < MAX_BIT_PER_BLOCK; bit_idx++) {
index b1f0f2c..9ad65cb 100644 (file)
@@ -50,7 +50,7 @@ NRF24l01::~NRF24l01 () {
     }
 }
 
-void 
+void
 NRF24l01::nrfInitModule (uint8_t chip_select, uint8_t chip_enable) {
        maa_result_t error = MAA_SUCCESS;
 
@@ -84,7 +84,7 @@ NRF24l01::nrfInitModule (uint8_t chip_select, uint8_t chip_enable) {
        m_spi = maa_spi_init (0);
 }
 
-void 
+void
 NRF24l01::nrfConfigModule() {
        /* Set RF channel */
        nrfConfigRegister (RF_CH, m_channel);
@@ -101,7 +101,7 @@ NRF24l01::nrfConfigModule() {
 }
 
 /* Clocks only one byte into the given MiRF register */
-void 
+void
 NRF24l01::nrfConfigRegister(uint8_t reg, uint8_t value) {
        nrfCSOn ();
        maa_spi_write (m_spi, W_REGISTER | (REGISTER_MASK & reg));
@@ -109,16 +109,16 @@ NRF24l01::nrfConfigRegister(uint8_t reg, uint8_t value) {
        nrfCSOff ();
 }
 
-void 
+void
 NRF24l01::nrfPowerUpRX() {
        m_ptx = 0;
        nrfCELow();
        nrfConfigRegister(CONFIG, mirf_CONFIG | ( (1<<PWR_UP) | (1<<PRIM_RX) ) );
        nrfCEHigh();
-       nrfConfigRegister(STATUS,(1 << TX_DS) | (1 << MAX_RT)); 
+       nrfConfigRegister(STATUS,(1 << TX_DS) | (1 << MAX_RT));
 }
 
-void 
+void
 NRF24l01::nrfFlushRX() {
        nrfCSOn ();
        maa_spi_write (m_spi, FLUSH_RX);
@@ -126,7 +126,7 @@ NRF24l01::nrfFlushRX() {
 }
 
 /* Sets the receiving address */
-void 
+void
 NRF24l01::nrfSetRXaddr(uint8_t * addr) {
        nrfCELow();
        nrfWriteRegister(RX_ADDR_P1, addr, mirf_ADDR_LEN);
@@ -134,7 +134,7 @@ NRF24l01::nrfSetRXaddr(uint8_t * addr) {
 }
 
 /* Sets the transmitting address */
-void 
+void
 NRF24l01::nrfSetTXaddr(uint8_t * addr)
 {
        /* RX_ADDR_P0 must be set to the sending addr for auto ack to work. */
@@ -143,20 +143,20 @@ NRF24l01::nrfSetTXaddr(uint8_t * addr)
 }
 
 /* The broadcast address should be 0xFFFFF */
-void 
+void
 NRF24l01::nrfSetBroadcastAddr (uint8_t * addr) {
        nrfCELow ();
        nrfWriteRegister (RX_ADDR_P2, addr, mirf_ADDR_LEN);
        nrfCEHigh ();
 }
 
-void 
+void
 NRF24l01::nrfSetPayload (uint8_t load) {
        m_payload = load;
 }
 
-void 
-NRF24l01::nrfWriteRegister(uint8_t reg, uint8_t * value, uint8_t len) 
+void
+NRF24l01::nrfWriteRegister(uint8_t reg, uint8_t * value, uint8_t len)
 {
        nrfCSOn ();
        maa_spi_write (m_spi, W_REGISTER | (REGISTER_MASK & reg));
@@ -164,7 +164,7 @@ NRF24l01::nrfWriteRegister(uint8_t reg, uint8_t * value, uint8_t len)
        nrfCSOff ();
 }
 
-void 
+void
 NRF24l01::nrfTransmitSync(uint8_t *dataout, uint8_t len){
        uint8_t i;
        for(i = 0; i < len; i++) {
@@ -173,7 +173,7 @@ NRF24l01::nrfTransmitSync(uint8_t *dataout, uint8_t len){
 }
 
 /* Checks if data is available for reading */
-bool 
+bool
 NRF24l01::nrfDataReady() {
        uint8_t status = nrfGetStatus();
        if ( status & (1 << RX_DR) ) {
@@ -183,7 +183,7 @@ NRF24l01::nrfDataReady() {
        return !nrfRXFifoEmpty();
 }
 
-uint8_t 
+uint8_t
 NRF24l01::nrfGetStatus () {
        uint8_t rv;
        nrfReadRegister (STATUS, &rv, 1);
@@ -191,7 +191,7 @@ NRF24l01::nrfGetStatus () {
 }
 
 /* Reads an array of bytes from the given start position in the MiRF registers. */
-void 
+void
 NRF24l01::nrfReadRegister (uint8_t reg, uint8_t * value, uint8_t len)
 {
        nrfCSOn ();
@@ -200,7 +200,7 @@ NRF24l01::nrfReadRegister (uint8_t reg, uint8_t * value, uint8_t len)
        nrfCSOff ();
 }
 
-void 
+void
 NRF24l01::nrfTransferSync (uint8_t *dataout,uint8_t *datain,uint8_t len) {
        uint8_t i;
        for(i = 0;i < len;i++) {
@@ -208,7 +208,7 @@ NRF24l01::nrfTransferSync (uint8_t *dataout,uint8_t *datain,uint8_t len) {
        }
 }
 
-bool 
+bool
 NRF24l01::nrfRXFifoEmpty () {
        uint8_t fifo_status;
        nrfReadRegister (FIFO_STATUS, &fifo_status, sizeof(fifo_status));
@@ -216,8 +216,8 @@ NRF24l01::nrfRXFifoEmpty () {
 }
 
 /* Reads payload bytes into data array */
-void 
-NRF24l01::nrfGetData (uint8_t * data) 
+void
+NRF24l01::nrfGetData (uint8_t * data)
 {
        nrfCSOn ();
        /* Send cmd to read rx payload */
@@ -230,7 +230,7 @@ NRF24l01::nrfGetData (uint8_t * data)
 
 /* Sends a data package to the default address. Be sure to send the correct
  * amount of bytes as configured as payload on the receiver. */
-void 
+void
 NRF24l01::nrfSend(uint8_t * value) {
        uint8_t status;
        status = nrfGetStatus();
@@ -257,12 +257,12 @@ NRF24l01::nrfSend(uint8_t * value) {
        nrfCEHigh();                                                    // Start transmission
 }
 
-void 
+void
 NRF24l01::nrfSend () {
        nrfSend (m_txBuffer);
 }
 
-bool 
+bool
 NRF24l01::nrfIsSending () {
        uint8_t status;
        if (m_ptx)      { // Sending mode.
@@ -270,46 +270,46 @@ NRF24l01::nrfIsSending () {
                /* if sending successful (TX_DS) or max retries exceded (MAX_RT). */
                if((status & ((1 << TX_DS)  | (1 << MAX_RT)))){
                        nrfPowerUpRX();
-                       return false; 
+                       return false;
                }
                return true;
        }
        return false;
 }
 
-void 
+void
 NRF24l01::nrfPowerUpTX () {
        m_ptx = 1;
        nrfConfigRegister (CONFIG, mirf_CONFIG | ( (1<<PWR_UP) | (0<<PRIM_RX) ) );
 }
 
-void 
+void
 NRF24l01::nrfPowerDown () {
        nrfCELow ();
        nrfConfigRegister (CONFIG, mirf_CONFIG);
 }
 
-maa_result_t 
+maa_result_t
 NRF24l01::nrfCEHigh () {
        return maa_gpio_write (m_cePinCtx, HIGH);
 }
 
-maa_result_t 
+maa_result_t
 NRF24l01::nrfCELow () {
        return maa_gpio_write (m_cePinCtx, LOW);
 }
 
-maa_result_t 
+maa_result_t
 NRF24l01::nrfCSOn () {
        return maa_gpio_write (m_csnPinCtx, LOW);
 }
 
-maa_result_t 
+maa_result_t
 NRF24l01::nrfCSOff () {
        return maa_gpio_write (m_csnPinCtx, HIGH);
 }
 
-void 
+void
 NRF24l01::nrfListenForChannel() {
        if(!nrfIsSending() && nrfDataReady()) {
                nrfGetData(m_rxBuffer);
index 223fb31..eb32036 100644 (file)
@@ -80,7 +80,7 @@
 #define PLL_LOCK               4
 #define RF_DR                  3
 #define RF_PWR                 1
-#define LNA_HCURR              0        
+#define LNA_HCURR              0
 #define RX_DR                  6
 #define TX_DS                  5
 #define MAX_RT                 4