Read battery voltage on Minewsemi ME25LS01

This commit is contained in:
Normunds Gavars
2025-07-04 19:27:11 +03:00
parent 70a9990f45
commit aa3c702ffd
5 changed files with 22 additions and 73 deletions

View File

@@ -2,26 +2,19 @@
#include "WVariant.h"
////////////////////////////////////////////////////////////////////////////////
// Low frequency clock source
#define USE_LFXO // 32.768 kHz crystal oscillator
#define VARIANT_MCK (64000000ul)
// #define USE_LFRC // 32.768 kHz RC oscillator
// Power
#define PIN_3V3_EN (32 + 5) // P1.6 Power to Sensors
#define PIN_3V3_ACC_EN -1
#define BATTERY_PIN (-1) // P0.2/AIN0
#define BATTERY_PIN (31)
#define BATTERY_IMMUTABLE
#define ADC_MULTIPLIER (2.0F)
#define ADC_RESOLUTION (14)
#define BATTERY_SENSE_RES (12)
#define AREF_VOLTAGE (3.0)
// Number of pins
#define PINS_COUNT (48)
#define NUM_DIGITAL_PINS (48)