fix sketch build error for itsybitsy and clue variants

This commit is contained in:
hathach committed 2019-12-27 16:44:50 +07:00
1 parent 6a33251537
commit 8c99950a59
4 files changed
+34 -33

No files matched your search

@@ -8,8 +8,8 @@ uint32_t vbat_pin = PIN_VBAT; // A7 for feather nRF52832, A6 for nRF
#define VBAT_MV_PER_LSB (0.73242188F) // 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096
#ifdef NRF52840_XXAA // if this is for nrf52840
#define VBAT_DIVIDER (0.5F) // 150K + 150K voltage divider on VBAT
#ifdef NRF52840_XXAA
#define VBAT_DIVIDER (0.5F) // 150K + 150K voltage divider on VBAT
#define VBAT_DIVIDER_COMP (2.0F) // Compensation factor for the VBAT divider
#else
#define VBAT_DIVIDER (0.71275837F) // 2M + 0.806M voltage divider on VBAT = (2M / (0.806M + 2M))
@@ -81,4 +81,5 @@ void loop() {
Serial.println("%)");
delay(1000);
}
}
@@ -28,25 +28,23 @@
/*------------- OLED and Buttons -------------*/
#if defined ARDUINO_NRF52832_FEATHER
// Feather nRF52832
#define BUTTON_A 31
#define BUTTON_B 30
#define BUTTON_C 27
#elif defined ARDUINO_NRF52840_FEATHER
// Feather nRF52840
#define BUTTON_A 9
#define BUTTON_B 6
#define BUTTON_C 5
// Feather nRF52832
#define BUTTON_A 31
#define BUTTON_B 30
#define BUTTON_C 27
#elif defined ARDUINO_NRF52840_CIRCUITPLAY
// Circuit Playground nRF52840 - FYI doesnt work probably because of button polarity!
#define BUTTON_A 4 // left button
#define BUTTON_B 7 // center switch
#define BUTTON_C 5 // right button
// Circuit Playground nRF52840 - FYI doesnt work probably because of button polarity!
#define BUTTON_A 4 // left button
#define BUTTON_B 7 // center switch
#define BUTTON_C 5 // right button
#else
#error board not supported
// Default for others
#define BUTTON_A 9
#define BUTTON_B 6
#define BUTTON_C 5
#endif
Adafruit_SSD1306 oled(-1);
@@ -30,22 +30,23 @@
#include <SPI.h>
#include <Adafruit_GFX.h>
#ifdef ARDUINO_NRF52832_FEATHER
#define TFT_DC 11
#define TFT_CS 31
#if defined(ARDUINO_NRF52832_FEATHER)
// Feather nRF52832
#define TFT_DC 11
#define TFT_CS 31
#elif defined(ARDUINO_NRF52840_CIRCUITPLAY)
// Circuit Playground Bluefruit for use with TFT 1.5" GIZMO
#define TFT_DC 1
#define TFT_CS 0
#define TFT_BACKLIGHT A3
#else
// Default for others
#define TFT_DC 10
#define TFT_CS 9
#endif
#ifdef ARDUINO_NRF52840_FEATHER
#define TFT_DC 10
#define TFT_CS 9
#endif
// Circuit Playground Bluefruit for use with TFT 1.5" GIZMO
#ifdef ARDUINO_NRF52840_CIRCUITPLAY
#define TFT_DC 1
#define TFT_CS 0
#define TFT_BACKLIGHT A3
#endif
#if TFT_IN_USE == TFT_35_FEATHERWING
#include "Adafruit_HX8357.h"
@@ -73,6 +73,7 @@ extern "C"
#define PIN_A4 (18)
#define PIN_A5 (19)
#define PIN_A6 (20)
#define PIN_A7 (0xff) // to compile with Firmata library
static const uint8_t A0 = PIN_A0 ;
static const uint8_t A1 = PIN_A1 ;
@@ -83,7 +84,7 @@ static const uint8_t A5 = PIN_A5 ;
static const uint8_t A6 = PIN_A6 ;
#define ADC_RESOLUTION 14
//static const uint8_t AREF = PIN_AREF;
//static const uint8_t AREF = PIN_AREF;
/*
* Serial interfaces