aboutsummaryrefslogtreecommitdiff
path: root/docs/drivers/ws2812.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/drivers/ws2812.md')
-rw-r--r--docs/drivers/ws2812.md44
1 files changed, 30 insertions, 14 deletions
diff --git a/docs/drivers/ws2812.md b/docs/drivers/ws2812.md
index 036ea40d1d..4d1e727928 100644
--- a/docs/drivers/ws2812.md
+++ b/docs/drivers/ws2812.md
@@ -160,15 +160,23 @@ To configure the DI pin for open drain configuration, add the following to your
Depending on the ChibiOS board configuration, you may need to enable SPI at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_SPI TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_SPI TRUE // [!code focus]
+
+#include_next <halconf.h>
```
-`mcuconf.h`:
-```c
-#undef STM32_SPI_USE_SPI1
-#define STM32_SPI_USE_SPI1 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_SPI_USE_SPI1 // [!code focus]
+#define STM32_SPI_USE_SPI1 TRUE // [!code focus]
```
+:::
The following `define`s apply only to the `spi` driver:
@@ -213,15 +221,23 @@ The following `#define`s apply only to the PIO driver:
Depending on the ChibiOS board configuration, you may need to enable PWM at the keyboard level. For STM32, this would look like:
-`halconf.h`:
-```c
-#define HAL_USE_PWM TRUE
+::: code-group
+```c [halconf.h]
+#pragma once
+
+#define HAL_USE_PWM TRUE // [!code focus]
+
+#include_next <halconf.h>
```
-`mcuconf.h`:
-```c
-#undef STM32_PWM_USE_TIM2
-#define STM32_PWM_USE_TIM2 TRUE
+```c [mcuconf.h]
+#pragma once
+
+#include_next <mcuconf.h>
+
+#undef STM32_PWM_USE_TIM2 // [!code focus]
+#define STM32_PWM_USE_TIM2 TRUE // [!code focus]
```
+:::
The following `#define`s apply only to the `pwm` driver: