Skip to content

Commit 98fd372

Browse files
committed
Add missing define
1 parent ee1559b commit 98fd372

File tree

2 files changed

+15
-0
lines changed
  • ports/stm32f4/common-hal/microcontroller

2 files changed

+15
-0
lines changed

ports/stm32f4/common-hal/microcontroller/Pin.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@
3131
#include "stm32f4/pins.h"
3232
#include "stm32f4xx_hal.h"
3333

34+
#ifdef MICROPY_HW_NEOPIXEL
35+
bool neopixel_in_use;
36+
#endif
37+
#ifdef MICROPY_HW_APA102_MOSI
38+
bool apa102_sck_in_use;
39+
bool apa102_mosi_in_use;
40+
#endif
41+
#ifdef SPEAKER_ENABLE_PIN
42+
bool speaker_enable_in_use;
43+
#endif
44+
3445
#if MCU_PACKAGE == 144
3546
#define GPIO_PORT_COUNT 7
3647
GPIO_TypeDef * ports[GPIO_PORT_COUNT] = {GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG};

ports/stm32f4/common-hal/microcontroller/Pin.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#ifdef MICROPY_HW_NEOPIXEL
3535
extern bool neopixel_in_use;
3636
#endif
37+
#ifdef MICROPY_HW_APA102_MOSI
38+
extern bool apa102_sck_in_use;
39+
extern bool apa102_mosi_in_use;
40+
#endif
3741

3842
void reset_all_pins(void);
3943
// reset_pin_number takes the pin number instead of the pointer so that objects don't

0 commit comments

Comments
 (0)