diff --git a/src/stm32-i2s.cpp b/src/stm32-i2s.cpp index 4265bd6..a987107 100644 --- a/src/stm32-i2s.cpp +++ b/src/stm32-i2s.cpp @@ -1,6 +1,8 @@ #include "stm32-i2s.h" +#ifdef STM_I2S_PINS + namespace stm32_i2s { //Stm32I2sClass I2S; @@ -92,3 +94,6 @@ extern "C" void assert_failed(uint8_t *file, uint32_t line) { #endif /* USE_FULL_ASSERT */ } + +#endif // STM_I2S_PINS + diff --git a/src/stm32-i2s.h b/src/stm32-i2s.h index ccdeb0e..658c40a 100644 --- a/src/stm32-i2s.h +++ b/src/stm32-i2s.h @@ -28,6 +28,9 @@ # include "stm32f4xx_hal.h" #endif +#ifdef STM_I2S_PINS + + extern uint32_t g_anOutputPinConfigured[MAX_NB_PORT]; namespace stm32_i2s { @@ -645,3 +648,7 @@ void STM32_LOG(const char *msg) { //extern Stm32I2sClass I2S; } // namespace stm32_i2s + +#else +#warning STM_I2S_PINS not defined +#endif