Skip to content

Commit 174a292

Browse files
committed
Work around MCCI STM32 BSP V2.5 issue
1 parent 78a58be commit 174a292

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/compliance-otaa-halconfig/compliance-otaa-halconfig.ino

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,18 @@ void myFail(const char *pMessage) {
580580
}
581581
}
582582

583+
// there's a problem with running 2.5 of the MCCI STM32 BSPs;
584+
// hack around it.
585+
#ifdef ARDUINO_ARCH_STM32
586+
# ifdef _mcci_arduino_version
587+
# if _mcci_arduino_version <= _mcci_arduino_version_calc(2, 5, 0, 0)
588+
uint32_t USBD_LL_ConnectionState(void) {
589+
return 1;
590+
}
591+
# endif // _mcci_arduino_version
592+
# endif // defined(_mcci_arduino_version)
593+
#endif // ARDUINO_ARCH_STM32
594+
583595
void setup() {
584596
delay(5000);
585597
while (! Serial)

0 commit comments

Comments
 (0)