Skip to content

Commit

Permalink
use consistant define
Browse files Browse the repository at this point in the history
  • Loading branch information
ladyada committed Oct 17, 2019
1 parent 23dd998 commit ee7fac1
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Adafruit_Circuit_Playground.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Adafruit_CircuitPlayground {
Adafruit_CPlay_Mic mic; ///< the microphone object
Adafruit_CPlay_Speaker speaker; ///< the speaker object

#if defined (__AVR__) || defined(ARDUINO_CIRCUITPLAY_NRF52840) // Circuit Playground 'classic' or bluefruit
#if defined (__AVR__) || defined(ARDUINO_NRF52840_CIRCUITPLAY) // Circuit Playground 'classic' or bluefruit
CPlay_CapacitiveSensor cap[8]; ///< the array of capacitive touch sensors
#else
Adafruit_CPlay_FreeTouch cap[7]; ///< the array of capacitive touch sensors
Expand Down
6 changes: 3 additions & 3 deletions utility/Adafruit_CPlay_Mic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ uint16_t sincfilter[DECIMATION] = {0, 2, 9, 21, 39, 63, 94, 132, 179, 236, 302,

static bool pdmConfigured = false;

#elif defined(ARDUINO_CIRCUITPLAY_NRF52840)
#elif defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include <PDM.h>
// The default Circuit Playground Bluefruit pins
Expand Down Expand Up @@ -171,7 +171,7 @@ void Adafruit_CPlay_Mic::capture(int16_t *buf, uint16_t nSamples) {

*ptr++ = runningsum;
}
#elif defined(ARDUINO_CIRCUITPLAY_NRF52840)
#elif defined(ARDUINO_NRF52840_CIRCUITPLAY)
if(!pdmConfigured){
PDM.onReceive(onPDMdata);
PDM.begin(1, SAMPLERATE_HZ);
Expand Down Expand Up @@ -214,7 +214,7 @@ float Adafruit_CPlay_Mic::soundPressureLevel(uint16_t ms){
#elif defined(ARDUINO_ARCH_SAMD)
gain = 9;
len = (float)(SAMPLERATE_HZ/1000) * ms;
#elif defined(ARDUINO_CIRCUITPLAY_NRF52840)
#elif defined(ARDUINO_NRF52840_CIRCUITPLAY)
gain = 2;
len = (float)(SAMPLERATE_HZ/1000) * ms;
#else
Expand Down
2 changes: 1 addition & 1 deletion utility/CP_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ writePort(port, value, bitmask): Write an 8 bit port.
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)

// Circuit Playground Bluefruit
#elif defined(ARDUINO_CIRCUITPLAY_NRF52840)
#elif defined(ARDUINO_NRF52840_CIRCUITPLAY)
#define TOTAL_ANALOG_PINS 6
#define TOTAL_PINS 25 // 14 digital + 6 analog + 2 i2c + 3 spi
#define TOTAL_PORTS 3 // set when TOTAL_PINS > num digitial I/O pins
Expand Down
2 changes: 1 addition & 1 deletion utility/CPlay_CapacitiveSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "WProgram.h"
#endif

#if defined(ARDUINO_CIRCUITPLAY_NRF52840)
#if defined(ARDUINO_NRF52840_CIRCUITPLAY)
#define RwReg uint32_t
#elif defined(__AVR__)
#define RwReg uint8_t
Expand Down
2 changes: 1 addition & 1 deletion utility/IRLibDecodeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* protocol specific decoders.
*/

#if !defined(ARDUINO_CIRCUITPLAY_NRF52840)
#if !defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include "IRLibDecodeBase.h"
#include "IRLibHardware.h"
Expand Down
2 changes: 1 addition & 1 deletion utility/IRLibHardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* enableIRIn after every decode and the system handles it.
*/

#if !defined(ARDUINO_CIRCUITPLAY_NRF52840)
#if !defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include "IRLibHardware.h"
uint8_t IRLib_didIROut=false;
Expand Down
2 changes: 1 addition & 1 deletion utility/IRLibProtocols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* It is used by both Send and Decode sections of the code but not Receive.
*/

#if !defined(ARDUINO_CIRCUITPLAY_NRF52840)
#if !defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include "IRLibProtocols.h"

Expand Down
2 changes: 1 addition & 1 deletion utility/IRLibRecvBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* interrupts is also in a separate folder IRLibFreq.
*/

#if !defined(ARDUINO_CIRCUITPLAY_NRF52840)
#if !defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include "IRLibRecvBase.h"
#include "IRLibHardware.h"
Expand Down
2 changes: 1 addition & 1 deletion utility/IRLibSendBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* spaces of varying length of microseconds in the manner which the protocol defines.
*/

#if !defined(ARDUINO_CIRCUITPLAY_NRF52840 )
#if !defined(ARDUINO_NRF52840_CIRCUITPLAY)

#include "IRLibSendBase.h"
#include "IRLibHardware.h"
Expand Down

0 comments on commit ee7fac1

Please sign in to comment.