File tree 1 file changed +3
-2
lines changed
examples/NonReg/CheckVariant
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7
7
#include " utils.h"
8
8
9
9
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION <= 0x01090000)
10
- #error "This sketch is not compatible with core version prior to 2.0.0"
10
+ #error "This sketch is not compatible with core version prior to 2.0.0"
11
11
#endif
12
12
13
13
#define PORTx (pn ) (char )(' A' + STM_PORT(pn))
24
24
*/
25
25
bool checkSerial (void ) {
26
26
bool testPassed = true ;
27
+ #if defined(PinMap_UART_RX) && defined(PinMap_UART_TX)
27
28
USART_TypeDef *uart_rx = (USART_TypeDef *)pinmap_peripheral (digitalPinToPinName (PIN_SERIAL_RX), PinMap_UART_RX);
28
29
USART_TypeDef *uart_tx = (USART_TypeDef *)pinmap_peripheral (digitalPinToPinName (PIN_SERIAL_TX), PinMap_UART_TX);
29
30
if (uart_rx == NP) {
@@ -38,7 +39,7 @@ bool checkSerial(void) {
38
39
/* PIN_SERIAL_RX (%d) doesn't match PIN_SERIAL_TX peripheral */
39
40
testPassed = false ;
40
41
}
41
-
42
+ # endif
42
43
return testPassed;
43
44
}
44
45
You can’t perform that action at this time.
0 commit comments