summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSergey Vlasov <sigprof@gmail.com>2023-01-19 02:30:58 +0300
committerGitHub <noreply@github.com>2023-01-19 10:30:58 +1100
commit272281f1a0a3d5f07e0dfa890f1af2f360ca54bf (patch)
treec6991c0f86e8cc48cb617464d9c0e240c8df1019 /docs
parent12f1a30d165ea89c5d8dbee916500ed1226ab56d (diff)
Add analog support for RP2040 (#19453)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/adc_driver.md17
-rw-r--r--docs/platformdev_rp2040.md2
2 files changed, 18 insertions, 1 deletions
diff --git a/docs/adc_driver.md b/docs/adc_driver.md
index 69fff4b3c2..494d90c94f 100644
--- a/docs/adc_driver.md
+++ b/docs/adc_driver.md
@@ -43,6 +43,8 @@ Then place this include at the top of your code:
43 43
44### ARM 44### ARM
45 45
46#### STM32
47
46Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC. 48Note that some of these pins are doubled-up on ADCs with the same channel. This is because the pins can be used for either ADC.
47 49
48Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation. 50Also note that the F0 and F3 use different numbering schemes. The F0 has a single ADC and the channels are 0-indexed, whereas the F3 has 4 ADCs and the channels are 1-indexed. This is because the F0 uses the `ADCv1` implementation of the ADC, whereas the F3 uses the `ADCv3` implementation.
@@ -121,6 +123,21 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl
121 123
122<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup> 124<sup>² Not all STM32F4xx devices have ADC2 and/or ADC3, therefore some configurations shown in this table may be unavailable; in particular, pins `F4`…`F10` cannot be used as ADC inputs on devices which do not have ADC3. Check the device datasheet to confirm which pin functions are supported.</sup>
123 125
126#### RP2040
127
128RP2040 has only a single ADC (`ADCD1` in ChibiOS); in the QMK API the index for that ADC is 0.
129
130|Channel|Pin |
131|-------|-------------------|
132|0 |`GP26` |
133|1 |`GP27` |
134|2 |`GP28` |
135|3 |`GP29` |
136|4 |Temperature sensor*|
137
138
139<sup>* The temperature sensor is disabled by default and needs to be enabled by the RP2040-specific function: `adcRPEnableTS(&ADCD1)`. The ADC must be initialized before calling that function; an easy way to ensure that is to perform a dummy conversion.</sup>
140
124## Functions 141## Functions
125 142
126### AVR 143### AVR
diff --git a/docs/platformdev_rp2040.md b/docs/platformdev_rp2040.md
index 11a93edd89..b5b32c7b08 100644
--- a/docs/platformdev_rp2040.md
+++ b/docs/platformdev_rp2040.md
@@ -4,7 +4,7 @@ The following table shows the current driver status for peripherals on RP2040 MC
4 4
5| System | Support | 5| System | Support |
6| ---------------------------------------------------------------- | ---------------------------------------------- | 6| ---------------------------------------------------------------- | ---------------------------------------------- |
7| [ADC driver](adc_driver.md) | Support planned (no ETA) | 7| [ADC driver](adc_driver.md) | :heavy_check_mark: |
8| [Audio](audio_driver.md#pwm-hardware) | :heavy_check_mark: | 8| [Audio](audio_driver.md#pwm-hardware) | :heavy_check_mark: |
9| [Backlight](feature_backlight.md) | :heavy_check_mark: | 9| [Backlight](feature_backlight.md) | :heavy_check_mark: |
10| [I2C driver](i2c_driver.md) | :heavy_check_mark: | 10| [I2C driver](i2c_driver.md) | :heavy_check_mark: |