Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing define
  • Loading branch information
hierophect committed Nov 15, 2019
commit 98fd372d5b602e29b89102c500e4d8e79f9c4d28
11 changes: 11 additions & 0 deletions ports/stm32f4/common-hal/microcontroller/Pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
4 changes: 4 additions & 0 deletions ports/stm32f4/common-hal/microcontroller/Pin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down