Skip to content

Commit 7c99763

Browse files
committed
add: 添加ADC的新API
1 parent fbd6f06 commit 7c99763

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

docs/library/adc.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,35 @@ void analogReference(eAnalogReference ulMode) ;
4949
```cpp
5050
void analogReadResolution(uint8_t bits);
5151
```
52+
53+
### analogReadMillivolts
54+
55+
此函数用于获取给定引脚上的实际电压值(单位为毫伏)。
56+
57+
```cpp
58+
uint32_t analogReadMillivolts(uint32_t ulPin);
59+
```
60+
61+
- `ulPin` GPIO 引脚
62+
63+
该函数将返回模拟电压值。
64+
65+
### analogReadTempSensor
66+
67+
此函数用于获取内部温度传感器的实际温度值(单位为摄氏度)。
68+
69+
```cpp
70+
uint32_t analogReadTempSensor(void);
71+
```
72+
73+
该函数将返回模拟温度值。
74+
75+
### analogReadVref
76+
77+
此函数用于获取内部参考电压的实际电压值(单位为毫伏)。
78+
79+
```cpp
80+
uint32_t analogReadVref(void);
81+
```
82+
83+
该函数将返回模拟电压值。

0 commit comments

Comments
 (0)