# Conflicts: # MQTT_INTERNALS.md # build.sh # docs/cli_commands.md # examples/simple_repeater/MyMesh.cpp # examples/simple_repeater/MyMesh.h # examples/simple_repeater/UITask.cpp # examples/simple_room_server/MyMesh.cpp # examples/simple_room_server/MyMesh.h # examples/simple_room_server/UITask.cpp # examples/simple_sensor/SensorMesh.cpp # platformio.ini # scripts/generate_webconfig_html.py # src/MeshCore.h # src/helpers/CommonCLI.cpp # src/helpers/CommonCLI.h # src/helpers/CommonCLI_Observer.cpp # src/helpers/ESP32Board.h # src/helpers/MQTTMessageBuilder.cpp # src/helpers/MQTTPresets.h # src/helpers/NRF52Board.cpp # src/helpers/NRF52Board.h # src/helpers/bridges/MQTTBridge.cpp # src/helpers/bridges/MQTTBridge.h # src/helpers/esp32/WebConfigServer.cpp # src/helpers/esp32/WebConfigServer.h # src/helpers/radiolib/RadioLibWrappers.cpp # src/helpers/radiolib/RadioLibWrappers.h # variants/lilygo_tbeam_SX1262/platformio.ini # variants/lilygo_tbeam_SX1276/platformio.ini # variants/lilygo_tlora_v2_1/platformio.ini # webui/index.html
46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#include <Arduino.h>
|
|
#include "PicoWBoard.h"
|
|
|
|
//#include <bluefruit.h>
|
|
#include <Wire.h>
|
|
|
|
//static BLEDfu bledfu;
|
|
|
|
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) {
|
|
(void)conn_handle;
|
|
(void)reason;
|
|
|
|
MESH_DEBUG_PRINTLN("BLE client disconnected");
|
|
}
|
|
|
|
void PicoWBoard::begin() {
|
|
// for future use, sub-classes SHOULD call this from their begin()
|
|
startup_reason = BD_STARTUP_NORMAL;
|
|
pinMode(PIN_VBAT_READ, INPUT);
|
|
#ifdef PIN_USER_BTN
|
|
pinMode(PIN_USER_BTN, INPUT_PULLUP);
|
|
#endif
|
|
|
|
#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);
|
|
//digitalWrite(SX126X_POWER_EN, HIGH);
|
|
delay(10); // give sx1262 some time to power up
|
|
}
|
|
|
|
bool PicoWBoard::startOTAUpdate(const char* id, char reply[], bool force_ap) {
|
|
(void)id;
|
|
(void)reply;
|
|
(void)force_ap;
|
|
return false;
|
|
}
|