mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Waveshare RP2040-LoRa board support
This commit is contained in:
parent
8a7ec9d7fe
commit
8f6b2b75d7
7 changed files with 306 additions and 1 deletions
29
src/helpers/rp2040/WaveshareBoard.cpp
Normal file
29
src/helpers/rp2040/WaveshareBoard.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "WaveshareBoard.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Wire.h>
|
||||
|
||||
void WaveshareBoard::begin() {
|
||||
// for future use, sub-classes SHOULD call this from their begin()
|
||||
startup_reason = BD_STARTUP_NORMAL;
|
||||
|
||||
#ifdef PIN_LED_BUILTIN
|
||||
pinMode(PIN_LED_BUILTIN, OUTPUT);
|
||||
#endif
|
||||
|
||||
#ifdef PIN_VBAT_READ
|
||||
pinMode(PIN_VBAT_READ, INPUT);
|
||||
#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
|
||||
}
|
||||
|
||||
bool WaveshareBoard::startOTAUpdate(const char *id, char reply[]) {
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue