mirror of
https://github.com/Genaker/LoraSA.git
synced 2026-03-28 17:42:59 +01:00
* attempt at getting the spi issues fixed * Fix for Heltec Lora V3 (v3.2) variant * Better warning message
42 lines
690 B
C
42 lines
690 B
C
#pragma once
|
|
#include <config.h>
|
|
|
|
struct
|
|
{
|
|
String name;
|
|
uint8_t address;
|
|
} known_i2c_devices[] = {{"HMC5883L", 0x1e}, {"QMC5883L", 0x0d}, {" last record ", 0}};
|
|
|
|
enum I2CDevices
|
|
{
|
|
// powers of 2
|
|
HMC5883L = 1,
|
|
QMC5883L = 2
|
|
};
|
|
|
|
extern uint8_t wireDevices;
|
|
extern uint8_t wire1Devices;
|
|
|
|
#ifndef HELTEC
|
|
extern SPIClass &hspi;
|
|
#endif
|
|
|
|
// abstract away a reference to Serial vs Serial0 vs Serial1, so it compiles
|
|
#ifndef ARDUINO_USB_CDC_ON_BOOT
|
|
#define Uart0 Serial
|
|
#else
|
|
#define Uart0 Serial0
|
|
#endif
|
|
|
|
#if SOC_UART_NUM > 1
|
|
#define Uart1 Serial1
|
|
#else
|
|
#define Uart1 Uart0
|
|
#endif
|
|
|
|
bool initSPIs(Config &config);
|
|
|
|
bool initUARTs(Config &config);
|
|
|
|
bool initWires(Config &config);
|