Skip to content

Commit 3a0bb12

Browse files
authored
Update adc1_cal.py
1 parent 0e7785f commit 3a0bb12

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

adc1_cal.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,32 +95,32 @@
9595
# fmt: off
9696
# Constant from
9797
# https://github.com/espressif/esp-idf/blob/master/components/soc/esp32/include/soc/soc.h
98-
_DR_REG_EFUSE_BASE = const(0x3FF5A000)
98+
_DR_REG_EFUSE_BASE = const(0x3FF5A000)
9999

100100
# Constants from
101101
# https://github.com/espressif/esp-idf/blob/master/components/soc/esp32/include/soc/efuse_reg.h
102-
_EFUSE_ADC_VREF = const(0x0000001F)
103-
_EFUSE_BLK0_RDATA4_REG = _DR_REG_EFUSE_BASE + 0x010
102+
_EFUSE_ADC_VREF = const(0x0000001F)
103+
_EFUSE_BLK0_RDATA4_REG = _DR_REG_EFUSE_BASE + 0x010
104104

105105
# Constants from
106106
# esp_adc_cal_esp32.c
107-
_ADC_12_BIT_RES = const(4096)
108-
_LIN_COEFF_A_SCALE = const(65536)
107+
_ADC_12_BIT_RES = const(4096)
108+
_LIN_COEFF_A_SCALE = const(65536)
109109
# LIN_COEFF_A_SCALE/2
110-
_LIN_COEFF_A_ROUND = const(32768)
111-
_ADC1_VREF_ATTEN_SCALE = [57431, 76236, 105481, 196602]
110+
_LIN_COEFF_A_ROUND = const(32768)
111+
_ADC1_VREF_ATTEN_SCALE = [57431, 76236, 105481, 196602]
112112
_ADC1_VREF_ATTEN_OFFSET = [75, 78, 107, 142]
113-
_VREF_REG = _EFUSE_BLK0_RDATA4_REG
114-
_VREF_OFFSET = const(1100)
115-
_VREF_STEP_SIZE = const(7)
116-
_VREF_FORMAT = const(0)
117-
_VREF_MASK = const(0x1F)
118-
_LUT_VREF_LOW = const(1000)
119-
_LUT_VREF_HIGH = const(1200)
120-
_LUT_ADC_STEP_SIZE = const(64)
121-
_LUT_POINTS = const(20)
122-
_LUT_LOW_THRESH = const(2880)
123-
_LUT_HIGH_THRESH = _LUT_LOW_THRESH + _LUT_ADC_STEP_SIZE
113+
_VREF_REG = _EFUSE_BLK0_RDATA4_REG
114+
_VREF_OFFSET = const(1100)
115+
_VREF_STEP_SIZE = const(7)
116+
_VREF_FORMAT = const(0)
117+
_VREF_MASK = const(0x1F)
118+
_LUT_VREF_LOW = const(1000)
119+
_LUT_VREF_HIGH = const(1200)
120+
_LUT_ADC_STEP_SIZE = const(64)
121+
_LUT_POINTS = const(20)
122+
_LUT_LOW_THRESH = const(2880)
123+
_LUT_HIGH_THRESH = _LUT_LOW_THRESH + _LUT_ADC_STEP_SIZE
124124
# fmt: on
125125

126126
# 20 Point lookup tables, covering ADC readings from 2880 to 4096, step size of 64

0 commit comments

Comments
 (0)