Skip to content

Commit

Permalink
Warning instead of errors when pins not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Aug 24, 2024
1 parent d77d477 commit c7a1a10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stm32-i2s.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

#include "stm32-i2s.h"

#ifdef STM_I2S_PINS

namespace stm32_i2s {

//Stm32I2sClass I2S;
Expand Down Expand Up @@ -92,3 +94,6 @@ extern "C" void assert_failed(uint8_t *file, uint32_t line) {
#endif /* USE_FULL_ASSERT */

}

#endif // STM_I2S_PINS

7 changes: 7 additions & 0 deletions src/stm32-i2s.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# include "stm32f4xx_hal.h"
#endif

#ifdef STM_I2S_PINS


extern uint32_t g_anOutputPinConfigured[MAX_NB_PORT];

namespace stm32_i2s {
Expand Down Expand Up @@ -645,3 +648,7 @@ void STM32_LOG(const char *msg) {
//extern Stm32I2sClass I2S;

} // namespace stm32_i2s

#else
#warning STM_I2S_PINS not defined
#endif

0 comments on commit c7a1a10

Please sign in to comment.