Skip to content

Commit

Permalink
Merge pull request #47 from robberwick/issue44_compilation_error_spi_…
Browse files Browse the repository at this point in the history
…transfer

Extend gate for SPITransfer include
  • Loading branch information
PowerBroker2 authored Oct 18, 2020
2 parents e26f1b9 + 36f17bf commit b1a2493
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ See the [example sketches](https://github.com/PowerBroker2/SerialTransfer/tree/m

# ***NOTE:***

SPITransfer.h and it's associated features are not supported for the Arduino Nano 33 BLE or DUE.
SPITransfer.h and it's associated features are not supported for the Arduino Nano 33 BLE or DUE and other boards. This header file is disabled by default, but can be enabled by commenting out `#define DISABLE_SPI_SERIALTRANSFER 1` within `SerialTransfer.h`.
2 changes: 1 addition & 1 deletion src/SPITransfer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino.h"

#if not(defined(MBED_H) || defined(__SAM3X8E__)) // These boards are/will not be supported by SPITransfer.h
#if not(defined(MBED_H) || defined(__SAM3X8E__) || defined(DISABLE_SPI_SERIALTRANSFER)) // These boards are/will not be supported by SPITransfer.h

#include "SPITransfer.h"

Expand Down
2 changes: 1 addition & 1 deletion src/SPITransfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "Arduino.h"

#if not(defined(MBED_H) || defined(__SAM3X8E__)) // These boards are/will not be supported by SPITransfer.h
#if not(defined(MBED_H) || defined(__SAM3X8E__) || defined(DISABLE_SPI_SERIALTRANSFER)) // These boards are/will not be supported by SPITransfer.h

#include "Packet.h"
#include "SPI.h"
Expand Down
3 changes: 3 additions & 0 deletions src/SerialTransfer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include "Packet.h"


#define DISABLE_SPI_SERIALTRANSFER 1 // Comment out to use SPITransfer.h


class SerialTransfer
{
public: // <<---------------------------------------//public
Expand Down

0 comments on commit b1a2493

Please sign in to comment.