should pass travis now ( i hope)
This commit is contained in:
1 parent
13246f8fc0
commit
e8cf490cdc
5 files changed
+25
-16
No files matched your search
+1
-1
@@ -145,7 +145,7 @@ cplaynrf52840.build.core=nRF5
|
||||
cplaynrf52840.build.variant=circuitplayground_nrf52840
|
||||
cplaynrf52840.build.usb_manufacturer="Adafruit LLC"
|
||||
cplaynrf52840.build.usb_product="Adafruit Circuit Playground Bluefruit"
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52_CIRCUITPLAY {build.flags.usb}
|
||||
cplaynrf52840.build.extra_flags=-DNRF52840_XXAA -DARDUINO_NRF52840_CIRCUITPLAY {build.flags.usb}
|
||||
cplaynrf52840.build.ldscript=nrf52840_s140_v6.ld
|
||||
cplaynrf52840.build.vid=0x239A
|
||||
cplaynrf52840.build.pid=0x8045
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#if defined ARDUINO_NRF52840_CIRCUITPLAY
|
||||
#define PIN_VBAT A8 // this is just a mock read, we'll use the light sensor, so we can run the test
|
||||
#endif
|
||||
|
||||
uint32_t vbat_pin = PIN_VBAT; // A7 for feather nRF52832, A6 for nRF52840
|
||||
|
||||
#define VBAT_MV_PER_LSB (0.73242188F) // 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096
|
||||
@@ -77,4 +81,4 @@ void loop() {
|
||||
Serial.println("%)");
|
||||
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
@@ -39,14 +39,17 @@
|
||||
#define BUTTON_B 6
|
||||
#define BUTTON_C 5
|
||||
|
||||
#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
|
||||
|
||||
#else
|
||||
#error board not supported
|
||||
#endif
|
||||
|
||||
|
||||
#define OLED_RESET 4 // TODO remove ?
|
||||
Adafruit_SSD1306 oled(OLED_RESET);
|
||||
|
||||
Adafruit_SSD1306 oled(-1);
|
||||
|
||||
/*------------- Notification List -------------*/
|
||||
#define MAX_COUNT 20
|
||||
@@ -453,4 +456,4 @@ uint32_t readPressedButtons(void)
|
||||
lastDebounced = debounced;
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -26,12 +26,12 @@ BLEUart bleuart; // uart over ble
|
||||
|
||||
/* The Image Transfer module sends the image of your choice to Bluefruit LE over UART.
|
||||
* Each image sent begins with
|
||||
* - A single byte char “!” (0x21)
|
||||
* - A single byte char “!” (0x21)
|
||||
* - Image width (uint16 little endian, 2 bytes)
|
||||
* - Image height (uint16 little endian, 2 bytes)
|
||||
* - Pixel data encoded as RGB 24-bit and suffixed by a single byte CRC.
|
||||
*
|
||||
* Format: [ ‘!’ ] [ uint16 width ] [ uint16 height ] [ r g b ] [ r g b ] [ r g b ] … [ CRC ]
|
||||
* Format: [ ‘!’ ] [ uint16 width ] [ uint16 height ] [ r g b ] [ r g b ] [ r g b ] … [ CRC ]
|
||||
*/
|
||||
|
||||
uint16_t imageWidth = 0;
|
||||
@@ -45,17 +45,19 @@ uint32_t rxLastTime = 0;
|
||||
#ifdef ARDUINO_NRF52832_FEATHER
|
||||
#define TFT_DC 11
|
||||
#define TFT_CS 31
|
||||
#define STMPE_CS 30
|
||||
#define SD_CS 27
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_NRF52840_FEATHER
|
||||
#define TFT_DC 10
|
||||
#define TFT_CS 9
|
||||
#define STMPE_CS 6
|
||||
#define SD_CS 5
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_NRF52840_CIRCUITPLAY
|
||||
#define TFT_DC A7
|
||||
#define TFT_CS A6
|
||||
#endif
|
||||
|
||||
|
||||
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
|
||||
|
||||
void setup()
|
||||
@@ -199,4 +201,4 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason)
|
||||
tft.fillScreen(ILI9341_BLACK);
|
||||
tft.setCursor(0, 0);
|
||||
tft.println("Advertising ...");
|
||||
}
|
||||
}
|
||||
@@ -88,8 +88,8 @@ static const uint8_t A9 = PIN_A9 ;
|
||||
* Serial interfaces
|
||||
*/
|
||||
// Serial
|
||||
#define PIN_SERIAL_RX (1)
|
||||
#define PIN_SERIAL_TX (0)
|
||||
#define PIN_SERIAL_RX (0)
|
||||
#define PIN_SERIAL_TX (1)
|
||||
|
||||
/*
|
||||
* SPI Interfaces
|
||||
|
||||
Reference in new issue
Block a user