RAK11310Board.cpp 607 B

123456789101112131415161718192021222324252627282930
  1. #include "RAK11310Board.h"
  2. #include <Arduino.h>
  3. #include <Wire.h>
  4. void RAK11310Board::begin() {
  5. // for future use, sub-classes SHOULD call this from their begin()
  6. startup_reason = BD_STARTUP_NORMAL;
  7. #ifdef P_LORA_TX_LED
  8. pinMode(P_LORA_TX_LED, OUTPUT);
  9. #endif
  10. #ifdef PIN_VBAT_READ
  11. pinMode(PIN_VBAT_READ, INPUT);
  12. #endif
  13. #if defined(PIN_BOARD_SDA) && defined(PIN_BOARD_SCL)
  14. Wire.setSDA(PIN_BOARD_SDA);
  15. Wire.setSCL(PIN_BOARD_SCL);
  16. #endif
  17. Wire.begin();
  18. delay(10); // give sx1262 some time to power up
  19. }
  20. bool RAK11310Board::startOTAUpdate(const char *id, char reply[]) {
  21. return false;
  22. }