1
0
forked from me/IronOS

Zipping compiler warning about POW_PD_EXT / Two options (#1711)

* Zipping compiler warning about POW_PD_EXT / Option A

* Zipping compiler warning about POW_PD_EXT / Option B

* BSP/configuration.h: implement option A for POW_PD_EXT warning

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
This commit is contained in:
Ivan Zorin
2023-06-20 03:59:36 +03:00
committed by GitHub
parent 55d4420807
commit 155cf386b1
7 changed files with 21 additions and 20 deletions

View File

@@ -158,6 +158,7 @@
#define PROFILE_SUPPORT #define PROFILE_SUPPORT
#define POW_PD 1 #define POW_PD 1
#define POW_PD_EXT 0
#define TEMP_NTC #define TEMP_NTC
#define I2C_SOFT_BUS_2 #define I2C_SOFT_BUS_2
#define BATTFILTERDEPTH 8 #define BATTFILTERDEPTH 8

View File

@@ -86,7 +86,7 @@
#define POWER_PULSE_DEFAULT 0 #define POWER_PULSE_DEFAULT 0
#else #else
#define POWER_PULSE_DEFAULT 5 #define POWER_PULSE_DEFAULT 5
#endif #endif /* TS100 */
#define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s #define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
#define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms #define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms
@@ -126,6 +126,8 @@
#define ADC_MAX_READING (4096 * 8) // Maximum reading of the adc #define ADC_MAX_READING (4096 * 8) // Maximum reading of the adc
#define ADC_VDD_MV 3300 // ADC max reading millivolts #define ADC_VDD_MV 3300 // ADC max reading millivolts
#define POW_PD_EXT 0
// Deriving the Voltage div: // Deriving the Voltage div:
// Vin_max = (3.3*(r1+r2))/(r2) // Vin_max = (3.3*(r1+r2))/(r2)
// vdiv = (32768*4)/(vin_max*10) // vdiv = (32768*4)/(vin_max*10)
@@ -172,7 +174,7 @@
#define POW_DC #define POW_DC
#define TEMP_TMP36 #define TEMP_TMP36
#endif #endif /* TS100 */
#ifdef MODEL_TS101 #ifdef MODEL_TS101
#define VOLTAGE_DIV 700 // 700 - Default divider from schematic #define VOLTAGE_DIV 700 // 700 - Default divider from schematic
@@ -205,7 +207,7 @@
#define HAS_POWER_DEBUG_MENU #define HAS_POWER_DEBUG_MENU
#define DEBUG_POWER_MENU_BUTTON_B #define DEBUG_POWER_MENU_BUTTON_B
#endif #endif /* TS101 */
#if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0 #if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0
#define MAX_POWER_LIMIT 40 #define MAX_POWER_LIMIT 40
@@ -219,7 +221,7 @@
#define LIS_ORI_FLIP #define LIS_ORI_FLIP
#define OLED_FLIP #define OLED_FLIP
#endif #endif /* TS80(P) */
#ifdef MODEL_TS80 #ifdef MODEL_TS80
#define VOLTAGE_DIV 780 // Default divider from schematic #define VOLTAGE_DIV 780 // Default divider from schematic
@@ -232,7 +234,7 @@
#define POW_QC #define POW_QC
#define TEMP_TMP36 #define TEMP_TMP36
#endif #endif /* TS80 */
#ifdef MODEL_TS80P #ifdef MODEL_TS80P
#define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors #define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors
@@ -247,18 +249,14 @@
#define TEMP_NTC #define TEMP_NTC
#define I2C_SOFT_BUS_2 1 #define I2C_SOFT_BUS_2 1
#define SC7_ORI_FLIP #define SC7_ORI_FLIP
#endif #endif /* TS80P */
#endif
#ifdef MODEL_TS101 #ifdef MODEL_TS101
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024)) #define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
#else
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
#endif
#ifdef MODEL_TS101
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024)) #define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
#else #else
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024)) #define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
#endif #endif /* TS101 */
#endif /* CONFIGURATION_H_ */

View File

@@ -146,6 +146,7 @@
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F #define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
#define POW_PD 1 #define POW_PD 1
#define POW_PD_EXT 0
#define POW_QC 1 #define POW_QC 1
#define POW_DC 1 #define POW_DC 1
#define POW_QC_20V 1 #define POW_QC_20V 1

View File

@@ -146,6 +146,7 @@
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F #define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
#define DEVICE_HAS_VALIDATION_CODE // We have 2 digit validations #define DEVICE_HAS_VALIDATION_CODE // We have 2 digit validations
#define POW_PD 1 // Supported features #define POW_PD 1 // Supported features
#define POW_PD_EXT 0 // Future-proof macro for other models with other PD modes
#define POW_QC 1 // Supported features #define POW_QC 1 // Supported features
#define POW_DC 1 // Supported features #define POW_DC 1 // Supported features
#define POW_QC_20V 1 // Supported features #define POW_QC_20V 1 // Supported features