From 3c9c01189d4b4124a35b311f9e1198b53d4294c5 Mon Sep 17 00:00:00 2001 From: geeksville Date: Thu, 23 Apr 2020 18:47:27 -0700 Subject: [PATCH] old RF95 driver probably works on NRF52 now --- docs/software/nrf52-TODO.md | 4 ++-- platformio.ini | 7 ++++++- src/bare/NRF52Bluetooth.cpp | 4 ++-- src/configuration.h | 6 ++++++ 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/software/nrf52-TODO.md b/docs/software/nrf52-TODO.md index 65b360b6d..d42f5b0d3 100644 --- a/docs/software/nrf52-TODO.md +++ b/docs/software/nrf52-TODO.md @@ -1,9 +1,9 @@ # Initial work items -- get old radio driver working on NRF52 +- DONE get old radio driver working on NRF52 - get BLE working - add PMU driver -- add new radio driver +- add new radio driver - possibly start with https://os.mbed.com/teams/Semtech/code/SX126xLib/ - make a file system implementation (preferably one that can see the files the bootloader also sees) - add LCD driver - make a new boarddef with a variant.h file. Fix pins in that file. In particular: diff --git a/platformio.ini b/platformio.ini index 6505e6647..2a4591987 100644 --- a/platformio.ini +++ b/platformio.ini @@ -135,4 +135,9 @@ lib_ignore = BluetoothOTA lib_deps = ${env.lib_deps} -monitor_port = /dev/ttyACM1 \ No newline at end of file +monitor_port = /dev/ttyACM1 + +; Set initial breakpoint (defaults to main) +debug_init_break = +;debug_init_break = tbreak loop +;debug_init_break = tbreak Reset_Handler \ No newline at end of file diff --git a/src/bare/NRF52Bluetooth.cpp b/src/bare/NRF52Bluetooth.cpp index ea88b82b8..4d9813f1d 100644 --- a/src/bare/NRF52Bluetooth.cpp +++ b/src/bare/NRF52Bluetooth.cpp @@ -153,7 +153,7 @@ void NRF52Bluetooth::setup() Bluefruit.begin(); // Set the advertised device name (keep it short!) - Bluefruit.setName("Meshtastic52"); + Bluefruit.setName("Meshtastic52"); // FIXME // Set the connect/disconnect callback handlers Bluefruit.Periph.setConnectCallback(connect_callback); @@ -162,7 +162,7 @@ void NRF52Bluetooth::setup() // Configure and Start the Device Information Service DEBUG_MSG("Configuring the Device Information Service\n"); bledis.setManufacturer("meshtastic.org"); - bledis.setModel("NRF52-meshtastic"); + bledis.setModel("NRF52-meshtastic"); // FIXME bledis.begin(); // Start the BLE Battery Service and set it to 100% diff --git a/src/configuration.h b/src/configuration.h index cbf930f66..6c474c92d 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -213,6 +213,12 @@ along with this program. If not, see . #undef LED_INVERTED #define LED_INVERTED 1 +// Temporarily testing if we can build the RF95 driver for NRF52 +#define RESET_GPIO 14 // If defined, this pin will be used to reset the LORA radio +#define RF95_IRQ_GPIO 26 // IRQ line for the LORA radio +#define DIO1_GPIO 35 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number +#define DIO2_GPIO 34 // DIO1 & DIO2 are not currently used, but they must be assigned to a pin number + #endif // -----------------------------------------------------------------------------