[Bug] Fix compilation error for APA on ChibiOS (#21773)

This commit is contained in:
Drashna Jaelre 2023-08-17 17:39:16 -07:00 committed by GitHub
parent 89a30efd2d
commit 96d90a57d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,8 +22,8 @@
# if defined(__AVR__) # if defined(__AVR__)
# define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed # define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed
# elif defined(PROTOCOL_CHIBIOS) # elif defined(PROTOCOL_CHIBIOS)
# include "hal.h" # include "hal.h"
# include "chibios_config.h"
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) # if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103)
# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns # define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
# else # else