Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Softwarewire #82

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Adding USING_SPI define.
  • Loading branch information
finitespace committed Mar 15, 2018
commit 8ebeaf41955421a421d1921204a876710163d0a9
7 changes: 5 additions & 2 deletions src/BME280I2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ of www.endmemo.com, altitude equation courtesy of NOAA, and dew point equation
courtesy of Brian McNoldy at http:https://andrew.rsmas.miami.edu.
*/

#include <Wire.h>

#include "BME280I2C.h"

#include "Config.h"

#ifdef USING_WIRE
#include <Wire.h>
#endif

/****************************************************************/
BME280I2C::BME280I2C
Expand Down
8 changes: 7 additions & 1 deletion src/BME280Spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ of www.endmemo.com, altitude equation courtesy of NOAA, and dew point equation
courtesy of Brian McNoldy at http:https://andrew.rsmas.miami.edu.
*/

#include "Arduino.h"
#include "BME280Spi.h"

#include "Config.h"

#ifdef USING_SPI

#include <SPI.h>
#include "Arduino.h"

/****************************************************************/
BME280Spi::BME280Spi
Expand Down Expand Up @@ -132,3 +136,5 @@ bool BME280Spi::WriteRegister

return true;
}

#endif
1 change: 1 addition & 0 deletions src/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This header must be included in any derived code or copies of the code.

//#define USING_WIRE 1
//#define USING_SOFTWARE_WIRE 1
//#define USING_SPI
//#define USING_BRZO 1

#endif