diff options
| author | Hierophect <hierophect@gmail.com> | 2019-11-15 13:19:37 -0500 |
|---|---|---|
| committer | Hierophect <hierophect@gmail.com> | 2019-11-15 13:19:37 -0500 |
| commit | 98fd372d5b602e29b89102c500e4d8e79f9c4d28 (patch) | |
| tree | b7d2ccef5689fa58529fd3c37a15b0b185e766b9 | |
| parent | ee1559b9210cc3595e01d2d054308d1749c0d8b2 (diff) | |
Add missing define
| -rw-r--r-- | ports/stm32f4/common-hal/microcontroller/Pin.c | 11 | ||||
| -rw-r--r-- | ports/stm32f4/common-hal/microcontroller/Pin.h | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ports/stm32f4/common-hal/microcontroller/Pin.c b/ports/stm32f4/common-hal/microcontroller/Pin.c index 7e737e21b..9380bf139 100644 --- a/ports/stm32f4/common-hal/microcontroller/Pin.c +++ b/ports/stm32f4/common-hal/microcontroller/Pin.c @@ -31,6 +31,17 @@ #include "stm32f4/pins.h" #include "stm32f4xx_hal.h" +#ifdef MICROPY_HW_NEOPIXEL +bool neopixel_in_use; +#endif +#ifdef MICROPY_HW_APA102_MOSI +bool apa102_sck_in_use; +bool apa102_mosi_in_use; +#endif +#ifdef SPEAKER_ENABLE_PIN +bool speaker_enable_in_use; +#endif + #if MCU_PACKAGE == 144 #define GPIO_PORT_COUNT 7 GPIO_TypeDef * ports[GPIO_PORT_COUNT] = {GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG}; diff --git a/ports/stm32f4/common-hal/microcontroller/Pin.h b/ports/stm32f4/common-hal/microcontroller/Pin.h index c42b0801f..c4c9be6a8 100644 --- a/ports/stm32f4/common-hal/microcontroller/Pin.h +++ b/ports/stm32f4/common-hal/microcontroller/Pin.h @@ -34,6 +34,10 @@ #ifdef MICROPY_HW_NEOPIXEL extern bool neopixel_in_use; #endif +#ifdef MICROPY_HW_APA102_MOSI +extern bool apa102_sck_in_use; +extern bool apa102_mosi_in_use; +#endif void reset_all_pins(void); // reset_pin_number takes the pin number instead of the pointer so that objects don't |
