mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 11:10:52 +00:00
CrowPanel Advanced V2 support
This commit is contained in:
21
variants/esp32s3/elecrow_panel/variant.cpp
Normal file
21
variants/esp32s3/elecrow_panel/variant.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
// meshtastic/firmware/variants/elecrow_panel/variant.cpp
|
||||
|
||||
#include "variant.h"
|
||||
#include "Arduino.h"
|
||||
#include "Wire.h"
|
||||
|
||||
bool elecrow_v2 = false; // false = v1, true = v2
|
||||
|
||||
extern "C" {
|
||||
|
||||
void initVariant()
|
||||
{
|
||||
Wire.begin(I2C_SDA, I2C_SCL, 100000);
|
||||
delay(50);
|
||||
Wire.beginTransmission(0x30);
|
||||
if (Wire.endTransmission() == 0) {
|
||||
elecrow_v2 = true;
|
||||
}
|
||||
Wire.end();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user