Port to lora_isp4520 board

This commit is contained in:
Vadim Furman
2021-03-14 19:00:20 -07:00
parent ea40bd991c
commit 98d878cdfe
19 changed files with 604 additions and 128 deletions

View File

@@ -3,8 +3,8 @@
#include "configuration.h"
#include "main.h"
#include <bluefruit.h>
#include "mesh/mesh-pb-constants.h"
#include "mesh/PhoneAPI.h"
static BLEService meshBleService = BLEService(BLEUuid(MESH_SERVICE_UUID_16));
static BLECharacteristic fromNum = BLECharacteristic(BLEUuid(FROMNUM_UUID_16));
@@ -213,6 +213,7 @@ void NRF52Bluetooth::setup()
{
// Initialise the Bluefruit module
DEBUG_MSG("Initialise the Bluefruit nRF52 module\n");
Bluefruit.autoConnLed(false);
Bluefruit.begin();
// Set the advertised device name (keep it short!)

View File

@@ -1,6 +1,5 @@
#include "NRF52Bluetooth.h"
#include "configuration.h"
#include "graphics/TFTDisplay.h"
#include <SPI.h>
#include <Wire.h>
#include <assert.h>
@@ -118,10 +117,15 @@ void cpuDeepSleep(uint64_t msecToWake)
{
// FIXME, configure RTC or button press to wake us
// FIXME, power down SPI, I2C, RAMs
#if WIRE_INTERFACES_COUNT > 0
Wire.end();
#endif
SPI.end();
Serial.end();
#ifdef PIN_SERIAL_RX1
Serial1.end();
#endif
// FIXME, use system off mode with ram retention for key state?
// FIXME, use non-init RAM per