diff options
Diffstat (limited to 'docs/audio_driver.md')
| -rw-r--r-- | docs/audio_driver.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/docs/audio_driver.md b/docs/audio_driver.md index 7cd5a98d9..81c339007 100644 --- a/docs/audio_driver.md +++ b/docs/audio_driver.md | |||
| @@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion; | |||
| 57 | 57 | ||
| 58 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: | 58 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: |
| 59 | 59 | ||
| 60 | ``` c | 60 | ```c |
| 61 | //halconf.h: | 61 | //halconf.h: |
| 62 | #define HAL_USE_DAC TRUE | 62 | #define HAL_USE_DAC TRUE |
| 63 | #define HAL_USE_GPT TRUE | 63 | #define HAL_USE_GPT TRUE |
| 64 | #include_next <halconf.h> | 64 | #include_next <halconf.h> |
| 65 | ``` | 65 | ``` |
| 66 | 66 | ||
| 67 | ``` c | 67 | ```c |
| 68 | // mcuconf.h: | 68 | // mcuconf.h: |
| 69 | #include_next <mcuconf.h> | 69 | #include_next <mcuconf.h> |
| 70 | #undef STM32_DAC_USE_DAC1_CH1 | 70 | #undef STM32_DAC_USE_DAC1_CH1 |
| @@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t | |||
| 93 | 93 | ||
| 94 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: | 94 | Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: |
| 95 | 95 | ||
| 96 | ``` c | 96 | ```c |
| 97 | //halconf.h: | 97 | //halconf.h: |
| 98 | #define HAL_USE_DAC TRUE | 98 | #define HAL_USE_DAC TRUE |
| 99 | #define HAL_USE_GPT TRUE | 99 | #define HAL_USE_GPT TRUE |
| 100 | #include_next <halconf.h> | 100 | #include_next <halconf.h> |
| 101 | ``` | 101 | ``` |
| 102 | 102 | ||
| 103 | ``` c | 103 | ```c |
| 104 | // mcuconf.h: | 104 | // mcuconf.h: |
| 105 | #include_next <mcuconf.h> | 105 | #include_next <mcuconf.h> |
| 106 | #undef STM32_DAC_USE_DAC1_CH1 | 106 | #undef STM32_DAC_USE_DAC1_CH1 |
| @@ -153,7 +153,7 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out | |||
| 153 | The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. | 153 | The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. |
| 154 | 154 | ||
| 155 | A configuration example for the STM32F103C8 would be: | 155 | A configuration example for the STM32F103C8 would be: |
| 156 | ``` c | 156 | ```c |
| 157 | //halconf.h: | 157 | //halconf.h: |
| 158 | #define HAL_USE_PWM TRUE | 158 | #define HAL_USE_PWM TRUE |
| 159 | #define HAL_USE_PAL TRUE | 159 | #define HAL_USE_PAL TRUE |
| @@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be: | |||
| 161 | #include_next <halconf.h> | 161 | #include_next <halconf.h> |
| 162 | ``` | 162 | ``` |
| 163 | 163 | ||
| 164 | ``` c | 164 | ```c |
| 165 | // mcuconf.h: | 165 | // mcuconf.h: |
| 166 | #include_next <mcuconf.h> | 166 | #include_next <mcuconf.h> |
| 167 | #undef STM32_PWM_USE_TIM1 | 167 | #undef STM32_PWM_USE_TIM1 |
| @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for | |||
| 177 | - TIM1_CH4 = PA11 | 177 | - TIM1_CH4 = PA11 |
| 178 | 178 | ||
| 179 | with all this information, the configuration would contain these lines: | 179 | with all this information, the configuration would contain these lines: |
| 180 | ``` c | 180 | ```c |
| 181 | //config.h: | 181 | //config.h: |
| 182 | #define AUDIO_PIN A8 | 182 | #define AUDIO_PIN A8 |
| 183 | #define AUDIO_PWM_DRIVER PWMD1 | 183 | #define AUDIO_PWM_DRIVER PWMD1 |
