Browse Source

fixed: added back pin inits when SDA and SCL are set.

pull/111/head
recrof 1 year ago
parent
commit
882377e4d6
  1. 4
      src/helpers/nrf52/RAK4631Board.cpp
  2. 13
      src/helpers/nrf52/T1000eBoard.cpp
  3. 4
      src/helpers/nrf52/T114Board.cpp
  4. 10
      src/helpers/nrf52/TechoBoard.cpp
  5. 6
      src/helpers/nrf52/faketecBoard.cpp
  6. 4
      src/helpers/nrf52/faketecBoard.h

4
src/helpers/nrf52/RAK4631Board.cpp

@ -24,6 +24,10 @@ void RAK4631Board::begin() {
pinMode(PIN_VBAT_READ, INPUT);
pinMode(PIN_USER_BTN, INPUT_PULLUP);
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL)
#endif
Wire.begin();
pinMode(SX126X_POWER_EN, OUTPUT);

13
src/helpers/nrf52/T1000eBoard.cpp

@ -4,8 +4,7 @@
#include <bluefruit.h>
void T1000eBoard::begin()
{
void T1000eBoard::begin() {
// for future use, sub-classes SHOULD call this from their begin()
startup_reason = BD_STARTUP_NORMAL;
btn_prev_state = HIGH;
@ -16,6 +15,10 @@ void T1000eBoard::begin()
pinMode(LED_PIN, OUTPUT);
#endif
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL)
#endif
Wire.begin();
delay(10); // give sx1262 some time to power up
@ -24,14 +27,12 @@ void T1000eBoard::begin()
#if 0
static BLEDfu bledfu;
static void connect_callback(uint16_t conn_handle)
{
static void connect_callback(uint16_t conn_handle) {
(void)conn_handle;
MESH_DEBUG_PRINTLN("BLE client connected");
}
static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
static void disconnect_callback(uint16_t conn_handle, uint8_t reason) {
(void)conn_handle;
(void)reason;

4
src/helpers/nrf52/T114Board.cpp

@ -26,6 +26,10 @@ void T114Board::begin() {
pinMode(PIN_VBAT_READ, INPUT);
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL)
#endif
Wire.begin();
#ifdef P_LORA_TX_LED

10
src/helpers/nrf52/TechoBoard.cpp

@ -6,14 +6,12 @@
static BLEDfu bledfu;
static void connect_callback(uint16_t conn_handle)
{
static void connect_callback(uint16_t conn_handle) {
(void)conn_handle;
MESH_DEBUG_PRINTLN("BLE client connected");
}
static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
static void disconnect_callback(uint16_t conn_handle, uint8_t reason) {
(void)conn_handle;
(void)reason;
@ -26,6 +24,10 @@ void TechoBoard::begin() {
pinMode(PIN_VBAT_READ, INPUT);
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL)
#endif
Wire.begin();
pinMode(SX126X_POWER_EN, OUTPUT);

6
src/helpers/nrf52/faketecBoard.cpp

@ -6,14 +6,12 @@
static BLEDfu bledfu;
static void connect_callback(uint16_t conn_handle)
{
static void connect_callback(uint16_t conn_handle) {
(void)conn_handle;
MESH_DEBUG_PRINTLN("BLE client connected");
}
static void disconnect_callback(uint16_t conn_handle, uint8_t reason)
{
static void disconnect_callback(uint16_t conn_handle, uint8_t reason) {
(void)conn_handle;
(void)reason;

4
src/helpers/nrf52/faketecBoard.h

@ -31,6 +31,10 @@ public:
pinMode(PIN_VBAT_READ, INPUT);
#if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
Wire.setPins(PIN_BOARD_SDA, PIN_BOARD_SCL)
#endif
Wire.begin();
pinMode(SX126X_POWER_EN, OUTPUT);

Loading…
Cancel
Save