fix formatting, comments

This commit is contained in:
morgan 2016-07-03 13:27:01 -07:00
parent bdd06ce525
commit 8e5a101b1f
2 changed files with 4 additions and 7 deletions

View File

@ -8,8 +8,6 @@
#ifndef _HAMSHIELD_H_ #ifndef _HAMSHIELD_H_
#define _HAMSHIELD_H_ #define _HAMSHIELD_H_
//#include "I2Cdev_rda.h"
//#include "I2Cdev.h"
#include "HamShield_comms.h" #include "HamShield_comms.h"
#include "SimpleFIFO.h" #include "SimpleFIFO.h"
#include "AFSK.h" #include "AFSK.h"

View File

@ -35,7 +35,6 @@ int8_t HSreadWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data)
Wire.beginTransmission(devAddr); Wire.beginTransmission(devAddr);
Wire.write(regAddr); Wire.write(regAddr);
Wire.endTransmission(false); Wire.endTransmission(false);
// Wire.beginTransmission(devAddr);
Wire.requestFrom((int)devAddr, 2); // length=words, this wants bytes Wire.requestFrom((int)devAddr, 2); // length=words, this wants bytes
bool msb = true; // starts with MSB, then LSB bool msb = true; // starts with MSB, then LSB
@ -88,11 +87,11 @@ bool HSwriteWord(uint8_t devAddr, uint8_t regAddr, uint16_t data)
uint8_t status = 0; uint8_t status = 0;
Wire.beginTransmission(devAddr); Wire.beginTransmission(devAddr);
Wire.write(regAddr); // send address Wire.write(regAddr); // send address
Wire.write((uint8_t)(data >> 8)); // send MSB Wire.write((uint8_t)(data >> 8)); // send MSB
Wire.write((uint8_t)data); // send LSB Wire.write((uint8_t)data); // send LSB
status = Wire.endTransmission(); status = Wire.endTransmission();
return status == 0; return status == 0;
} }