Stm32 general (#10700)
* Attempt to generalize ARCH_STM32 * Trunk * One More ARCH_STM32 * Whoops, one snuck in there * Fix comment to reflect define change Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
GitHub
Copilot Autofix powered by AI
parent
bede05356d
commit
bbcc35e209
+2
-2
@@ -14,8 +14,8 @@
|
|||||||
#define FILE_O_READ "r"
|
#define FILE_O_READ "r"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARCH_STM32WL)
|
#if defined(ARCH_STM32)
|
||||||
// STM32WL
|
// STM32
|
||||||
#include "LittleFS.h"
|
#include "LittleFS.h"
|
||||||
#define FSCom InternalFS
|
#define FSCom InternalFS
|
||||||
#define FSBegin() FSCom.begin()
|
#define FSBegin() FSCom.begin()
|
||||||
|
|||||||
+6
-6
@@ -48,7 +48,7 @@
|
|||||||
#include "concurrency/LockGuard.h"
|
#include "concurrency/LockGuard.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARCH_STM32WL) && defined(BATTERY_PIN)
|
#if defined(ARCH_STM32) && defined(BATTERY_PIN)
|
||||||
#include "stm32yyxx_ll_adc.h"
|
#include "stm32yyxx_ll_adc.h"
|
||||||
|
|
||||||
/* Analog read resolution */
|
/* Analog read resolution */
|
||||||
@@ -431,7 +431,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
float scaled = 0;
|
float scaled = 0;
|
||||||
|
|
||||||
battery_adcEnable();
|
battery_adcEnable();
|
||||||
#ifdef ARCH_STM32WL
|
#ifdef ARCH_STM32
|
||||||
// STM32 ADC with VREFINT runtime calibration
|
// STM32 ADC with VREFINT runtime calibration
|
||||||
Vref = __LL_ADC_CALC_VREFANALOG_VOLTAGE(analogRead(AVREF), LL_ADC_RESOLUTION);
|
Vref = __LL_ADC_CALC_VREFANALOG_VOLTAGE(analogRead(AVREF), LL_ADC_RESOLUTION);
|
||||||
raw = analogRead(BATTERY_PIN);
|
raw = analogRead(BATTERY_PIN);
|
||||||
@@ -608,7 +608,7 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
bool initial_read_done = false;
|
bool initial_read_done = false;
|
||||||
float last_read_value = (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS);
|
float last_read_value = (OCV[NUM_OCV_POINTS - 1] * NUM_CELLS);
|
||||||
uint32_t last_read_time_ms = 0;
|
uint32_t last_read_time_ms = 0;
|
||||||
#ifdef ARCH_STM32WL
|
#ifdef ARCH_STM32
|
||||||
// 3300mV placeholder for STM32 errata where VREFINT factory calibration may be missing
|
// 3300mV placeholder for STM32 errata where VREFINT factory calibration may be missing
|
||||||
// (e.g. STM32U0, see DS14756 Rev 3 §2.4.1 "VREFINT offset")
|
// (e.g. STM32U0, see DS14756 Rev 3 §2.4.1 "VREFINT offset")
|
||||||
uint32_t Vref = 3300;
|
uint32_t Vref = 3300;
|
||||||
@@ -718,7 +718,7 @@ bool Power::analogInit()
|
|||||||
#define BATTERY_SENSE_RESOLUTION_BITS 10
|
#define BATTERY_SENSE_RESOLUTION_BITS 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ARCH_STM32WL
|
#ifdef ARCH_STM32
|
||||||
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
|
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
|
||||||
#elif defined(ARCH_ESP32) // ESP32 needs special analog stuff
|
#elif defined(ARCH_ESP32) // ESP32 needs special analog stuff
|
||||||
adc_oneshot_unit_init_cfg_t init_config = {
|
adc_oneshot_unit_init_cfg_t init_config = {
|
||||||
@@ -749,7 +749,7 @@ bool Power::analogInit()
|
|||||||
|
|
||||||
// NRF52 ADC init moved to powerHAL_init in nrf52 platform
|
// NRF52 ADC init moved to powerHAL_init in nrf52 platform
|
||||||
|
|
||||||
#if !defined(ARCH_ESP32) && !defined(ARCH_STM32WL)
|
#if !defined(ARCH_ESP32) && !defined(ARCH_STM32)
|
||||||
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
|
analogReadResolution(BATTERY_SENSE_RESOLUTION_BITS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -838,7 +838,7 @@ void Power::reboot()
|
|||||||
}
|
}
|
||||||
LOG_DEBUG("final reboot!");
|
LOG_DEBUG("final reboot!");
|
||||||
::reboot();
|
::reboot();
|
||||||
#elif defined(ARCH_STM32WL)
|
#elif defined(ARCH_STM32)
|
||||||
HAL_NVIC_SystemReset();
|
HAL_NVIC_SystemReset();
|
||||||
#else
|
#else
|
||||||
rebootAtMsec = -1;
|
rebootAtMsec = -1;
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ ScanI2C::FoundDevice ScanI2C::firstKeyboard() const
|
|||||||
|
|
||||||
ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const
|
ScanI2C::FoundDevice ScanI2C::firstAccelerometer() const
|
||||||
{
|
{
|
||||||
ScanI2C::DeviceType types[] = {MPU6050, LIS3DH, BMA423, LSM6DS3, BMX160, STK8BAXX,
|
ScanI2C::DeviceType types[] = {MPU6050, LIS3DH, BMA423, LSM6DS3, BMX160, STK8BAXX,
|
||||||
ICM20948, QMA6100P, BMM150, BMI270, ICM42607P};
|
ICM20948, QMA6100P, BMM150, BMI270, ICM42607P};
|
||||||
return firstOfOrNONE(11, types);
|
return firstOfOrNONE(11, types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#if defined(ARCH_PORTDUINO)
|
#if defined(ARCH_PORTDUINO)
|
||||||
#include "linux/LinuxHardwareI2C.h"
|
#include "linux/LinuxHardwareI2C.h"
|
||||||
#endif
|
#endif
|
||||||
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL)
|
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32)
|
||||||
#include "meshUtils.h" // vformat
|
#include "meshUtils.h" // vformat
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+4
-4
@@ -47,7 +47,7 @@ template <typename T, std::size_t N> std::size_t array_count(const T (&)[N])
|
|||||||
|
|
||||||
#if defined(ARCH_NRF52)
|
#if defined(ARCH_NRF52)
|
||||||
Uart *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
Uart *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
#elif defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
#elif defined(ARCH_ESP32) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32)
|
||||||
HardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
HardwareSerial *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
#elif defined(ARCH_RP2040)
|
#elif defined(ARCH_RP2040)
|
||||||
SerialUART *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
SerialUART *GPS::_serial_gps = &GPS_SERIAL_PORT;
|
||||||
@@ -642,7 +642,7 @@ bool GPS::verifyCachedProbePresence()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32)
|
||||||
_serial_gps->end();
|
_serial_gps->end();
|
||||||
_serial_gps->begin(cachedProbeBaud);
|
_serial_gps->begin(cachedProbeBaud);
|
||||||
#elif defined(ARCH_RP2040)
|
#elif defined(ARCH_RP2040)
|
||||||
@@ -1564,7 +1564,7 @@ GnssModel_t GPS::probe(int serialSpeed)
|
|||||||
|
|
||||||
switch (currentStep) {
|
switch (currentStep) {
|
||||||
case 0: {
|
case 0: {
|
||||||
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL)
|
#if defined(ARCH_NRF52) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32)
|
||||||
_serial_gps->end();
|
_serial_gps->end();
|
||||||
_serial_gps->begin(serialSpeed);
|
_serial_gps->begin(serialSpeed);
|
||||||
#elif defined(ARCH_RP2040)
|
#elif defined(ARCH_RP2040)
|
||||||
@@ -1921,7 +1921,7 @@ std::unique_ptr<GPS> GPS::createGps()
|
|||||||
#elif defined(ARCH_NRF52)
|
#elif defined(ARCH_NRF52)
|
||||||
_serial_gps->setPins(new_gps->rx_gpio, new_gps->tx_gpio);
|
_serial_gps->setPins(new_gps->rx_gpio, new_gps->tx_gpio);
|
||||||
_serial_gps->begin(GPS_BAUDRATE);
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
#elif defined(ARCH_STM32WL)
|
#elif defined(ARCH_STM32)
|
||||||
_serial_gps->setTx(new_gps->tx_gpio);
|
_serial_gps->setTx(new_gps->tx_gpio);
|
||||||
_serial_gps->setRx(new_gps->rx_gpio);
|
_serial_gps->setRx(new_gps->rx_gpio);
|
||||||
_serial_gps->begin(GPS_BAUDRATE);
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
|
|||||||
@@ -1533,8 +1533,7 @@ bool TFTDisplay::hasTouch(void)
|
|||||||
{
|
{
|
||||||
#ifdef RAK14014
|
#ifdef RAK14014
|
||||||
return true;
|
return true;
|
||||||
#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR) && !defined(HELTEC_MESH_NODE_T096) && \
|
#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR) && !defined(HELTEC_MESH_NODE_T096) && !defined(HELTEC_MESH_NODE_T1)
|
||||||
!defined(HELTEC_MESH_NODE_T1)
|
|
||||||
return tft->touch() != nullptr;
|
return tft->touch() != nullptr;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
@@ -1553,8 +1552,7 @@ bool TFTDisplay::getTouch(int16_t *x, int16_t *y)
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR) && !defined(HELTEC_MESH_NODE_T096) && \
|
#elif !defined(M5STACK) && !defined(HACKADAY_COMMUNICATOR) && !defined(HELTEC_MESH_NODE_T096) && !defined(HELTEC_MESH_NODE_T1)
|
||||||
!defined(HELTEC_MESH_NODE_T1)
|
|
||||||
return tft->getTouch(x, y);
|
return tft->getTouch(x, y);
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+1
-1
@@ -1191,7 +1191,7 @@ extern meshtastic_DeviceMetadata getDeviceMetadata()
|
|||||||
// No bluetooth on these targets (yet):
|
// No bluetooth on these targets (yet):
|
||||||
// Pico W / 2W may get it at some point
|
// Pico W / 2W may get it at some point
|
||||||
// Portduino and ESP32-C6 are excluded because we don't have a working bluetooth stacks integrated yet.
|
// Portduino and ESP32-C6 are excluded because we don't have a working bluetooth stacks integrated yet.
|
||||||
#if defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32WL) || defined(CONFIG_IDF_TARGET_ESP32C6)
|
#if defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) || defined(ARCH_STM32) || defined(CONFIG_IDF_TARGET_ESP32C6)
|
||||||
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_BLUETOOTH_CONFIG;
|
deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_BLUETOOTH_CONFIG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <unistd.h> // sbrk
|
#include <unistd.h> // sbrk
|
||||||
|
|
||||||
#ifdef ARCH_STM32WL
|
#if defined(ARCH_STM32)
|
||||||
// Returns the uncommitted sbrk headroom: addressable space between the current heap
|
// Returns the uncommitted sbrk headroom: addressable space between the current heap
|
||||||
// break and the stack pointer that has not yet been committed to the arena.
|
// break and the stack pointer that has not yet been committed to the arena.
|
||||||
static uint32_t sbrkHeadroom()
|
static uint32_t sbrkHeadroom()
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ bool AdminModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, meshta
|
|||||||
#if HAS_SCREEN
|
#if HAS_SCREEN
|
||||||
IF_SCREEN(screen->showSimpleBanner("Device is rebooting\ninto DFU mode.", 0));
|
IF_SCREEN(screen->showSimpleBanner("Device is rebooting\ninto DFU mode.", 0));
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_STM32WL)
|
#if defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_STM32)
|
||||||
enterDfuMode();
|
enterDfuMode();
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "BMM150Sensor.h"
|
#include "BMM150Sensor.h"
|
||||||
#include "BMX160Sensor.h"
|
#include "BMX160Sensor.h"
|
||||||
#include "ICM42607PSensor.h"
|
|
||||||
#include "ICM20948Sensor.h"
|
#include "ICM20948Sensor.h"
|
||||||
|
#include "ICM42607PSensor.h"
|
||||||
#include "LIS3DHSensor.h"
|
#include "LIS3DHSensor.h"
|
||||||
#include "LSM6DS3Sensor.h"
|
#include "LSM6DS3Sensor.h"
|
||||||
#include "MPU6050Sensor.h"
|
#include "MPU6050Sensor.h"
|
||||||
@@ -92,32 +92,44 @@ class AccelerometerThread : public concurrency::OSThread
|
|||||||
sensor = new BMA423Sensor(device);
|
sensor = new BMA423Sensor(device);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#if __has_include(<Adafruit_MPU6050.h>)
|
||||||
case ScanI2C::DeviceType::MPU6050:
|
case ScanI2C::DeviceType::MPU6050:
|
||||||
sensor = new MPU6050Sensor(device);
|
sensor = new MPU6050Sensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case ScanI2C::DeviceType::BMX160:
|
case ScanI2C::DeviceType::BMX160:
|
||||||
sensor = new BMX160Sensor(device);
|
sensor = new BMX160Sensor(device);
|
||||||
break;
|
break;
|
||||||
|
#if __has_include(<Adafruit_LIS3DH.h>)
|
||||||
case ScanI2C::DeviceType::LIS3DH:
|
case ScanI2C::DeviceType::LIS3DH:
|
||||||
sensor = new LIS3DHSensor(device);
|
sensor = new LIS3DHSensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if __has_include(<Adafruit_LSM6DS3TRC.h>)
|
||||||
case ScanI2C::DeviceType::LSM6DS3:
|
case ScanI2C::DeviceType::LSM6DS3:
|
||||||
sensor = new LSM6DS3Sensor(device);
|
sensor = new LSM6DS3Sensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
#ifdef HAS_STK8XXX
|
#ifdef HAS_STK8XXX
|
||||||
case ScanI2C::DeviceType::STK8BAXX:
|
case ScanI2C::DeviceType::STK8BAXX:
|
||||||
sensor = new STK8XXXSensor(device);
|
sensor = new STK8XXXSensor(device);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#if __has_include(<ICM_20948.h>)
|
||||||
case ScanI2C::DeviceType::ICM20948:
|
case ScanI2C::DeviceType::ICM20948:
|
||||||
sensor = new ICM20948Sensor(device);
|
sensor = new ICM20948Sensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if __has_include(<ICM42670P.h>)
|
||||||
case ScanI2C::DeviceType::ICM42607P:
|
case ScanI2C::DeviceType::ICM42607P:
|
||||||
sensor = new ICM42607PSensor(device);
|
sensor = new ICM42607PSensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if __has_include(<DFRobot_BMM150.h>)
|
||||||
case ScanI2C::DeviceType::BMM150:
|
case ScanI2C::DeviceType::BMM150:
|
||||||
sensor = new BMM150Sensor(device);
|
sensor = new BMM150Sensor(device);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
#ifdef HAS_BMI270
|
#ifdef HAS_BMI270
|
||||||
case ScanI2C::DeviceType::BMI270:
|
case ScanI2C::DeviceType::BMI270:
|
||||||
sensor = new BMI270Sensor(device);
|
sensor = new BMI270Sensor(device);
|
||||||
|
|||||||
@@ -59,40 +59,40 @@ bool MMC5983MASensor::readMagnetometer(float &xGauss, float &yGauss, float &zGau
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t MMC5983MASensor::runOnce()
|
int32_t MMC5983MASensor::runOnce()
|
||||||
{
|
{
|
||||||
float magX = 0, magY = 0, magZ = 0;
|
float magX = 0, magY = 0, magZ = 0;
|
||||||
if (!readMagnetometer(magX, magY, magZ)) {
|
if (!readMagnetometer(magX, magY, magZ)) {
|
||||||
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(MESHTASTIC_EXCLUDE_SCREEN)
|
|
||||||
if (doCalibration) {
|
|
||||||
beginCalibrationDisplay(showingScreen);
|
|
||||||
updateCalibrationExtrema(magX, magY, magZ, highestX, lowestX, highestY, lowestY, highestZ, lowestZ);
|
|
||||||
finishCalibrationIfExpired(showingScreen, compassCalibrationFileName, highestX, lowestX, highestY, lowestY, highestZ,
|
|
||||||
lowestZ);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
magX -= (highestX + lowestX) / 2;
|
|
||||||
magY -= (highestY + lowestY) / 2;
|
|
||||||
magZ -= (highestZ + lowestZ) / 2;
|
|
||||||
|
|
||||||
#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
|
|
||||||
float heading = atan2f(magY, magX) * RAD_TO_DEG + MMC5983MA_HEADING_OFFSET_DEG;
|
|
||||||
if (heading < 0.0f) {
|
|
||||||
heading += 360.0f;
|
|
||||||
} else if (heading >= 360.0f) {
|
|
||||||
heading -= 360.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
heading = applyCompassOrientation(heading);
|
|
||||||
if (screen) {
|
|
||||||
screen->setHeading(heading);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(MESHTASTIC_EXCLUDE_SCREEN)
|
||||||
|
if (doCalibration) {
|
||||||
|
beginCalibrationDisplay(showingScreen);
|
||||||
|
updateCalibrationExtrema(magX, magY, magZ, highestX, lowestX, highestY, lowestY, highestZ, lowestZ);
|
||||||
|
finishCalibrationIfExpired(showingScreen, compassCalibrationFileName, highestX, lowestX, highestY, lowestY, highestZ,
|
||||||
|
lowestZ);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
magX -= (highestX + lowestX) / 2;
|
||||||
|
magY -= (highestY + lowestY) / 2;
|
||||||
|
magZ -= (highestZ + lowestZ) / 2;
|
||||||
|
|
||||||
|
#if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
|
||||||
|
float heading = atan2f(magY, magX) * RAD_TO_DEG + MMC5983MA_HEADING_OFFSET_DEG;
|
||||||
|
if (heading < 0.0f) {
|
||||||
|
heading += 360.0f;
|
||||||
|
} else if (heading >= 360.0f) {
|
||||||
|
heading -= 360.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
heading = applyCompassOrientation(heading);
|
||||||
|
if (screen) {
|
||||||
|
screen->setHeading(heading);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MMC5983MASensor::calibrate(uint16_t forSeconds)
|
void MMC5983MASensor::calibrate(uint16_t forSeconds)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define ARCH_STM32WL
|
#define ARCH_STM32WL
|
||||||
|
#define ARCH_STM32
|
||||||
|
|
||||||
//
|
//
|
||||||
// defaults for STM32WL architecture
|
// defaults for STM32WL architecture
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
// Device specific curves go in variant.h
|
// Device specific curves go in variant.h
|
||||||
#ifndef OCV_ARRAY
|
#ifndef OCV_ARRAY
|
||||||
#if defined(ARCH_STM32WL) && BATTERY_PIN == AVBAT
|
#if defined(ARCH_STM32) && BATTERY_PIN == AVBAT
|
||||||
// STM32 VDD/VBAT absolute maximum is 4V so use an LFP curve
|
// STM32 VDD/VBAT absolute maximum is 4V so use an LFP curve
|
||||||
#define OCV_ARRAY 3650, 3400, 3340, 3320, 3300, 3280, 3270, 3260, 3240, 3200, 2500
|
#define OCV_ARRAY 3650, 3400, 3340, 3320, 3300, 3280, 3270, 3260, 3240, 3200, 2500
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user