From c57ae8cb1e06e35addb4b2696fb35bd4c8ca4165 Mon Sep 17 00:00:00 2001 From: Kyle Chesney Date: Mon, 13 Sep 2021 18:15:09 -0400 Subject: [PATCH] Move ARM-specific ADC Driver reqs to own section --- docs/adc_driver.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/adc_driver.md b/docs/adc_driver.md index 8f1b24699bb..3cfc0ec71a3 100644 --- a/docs/adc_driver.md +++ b/docs/adc_driver.md @@ -18,19 +18,7 @@ Then place this include at the top of your code: #include "analog.h" ``` -### ARM Usage -If using an ARM device, you will _also_ need to add the following to `mcuconf.h`: - -```c -#undef STM32_ADC_USE_ADC1 -#define STM32_ADC_USE_ADC1 TRUE -``` - -Add the following to `halconf.h`: - -```c -#define HAL_USE_ADC TRUE -``` +If using ARM, there are additional requirements detailed in [ARM Additional Requirements](#arm-additional-requirements). ## Channels @@ -157,6 +145,21 @@ Also note that the F0 and F3 use different numbering schemes. The F0 has a singl ## Configuration +### ARM Additional Requirements + +If using an ARM device, you will need to add the following to `mcuconf.h`: + +```c +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE +``` + +And add the following to `halconf.h`: + +```c +#define HAL_USE_ADC TRUE +``` + ## ARM The ARM implementation of the ADC has a few additional options that you can override in your own keyboards and keymaps to change how it operates. Please consult the corresponding `hal_adc_lld.h` in ChibiOS for your specific microcontroller for further documentation on your available options.