Skip to content

Commit c7a1a10

Browse files
committed
Warning instead of errors when pins not defined
1 parent d77d477 commit c7a1a10

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/stm32-i2s.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
#include "stm32-i2s.h"
33

4+
#ifdef STM_I2S_PINS
5+
46
namespace stm32_i2s {
57

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

9496
}
97+
98+
#endif // STM_I2S_PINS
99+

src/stm32-i2s.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
# include "stm32f4xx_hal.h"
2929
#endif
3030

31+
#ifdef STM_I2S_PINS
32+
33+
3134
extern uint32_t g_anOutputPinConfigured[MAX_NB_PORT];
3235

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

647650
} // namespace stm32_i2s
651+
652+
#else
653+
#warning STM_I2S_PINS not defined
654+
#endif

0 commit comments

Comments
 (0)