Skip to content

Commit 3b523b1

Browse files
authored
Avoid #error at compile time
1 parent 24ce323 commit 3b523b1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/Peripherals/HardwareTimer/PWM_FullConfiguration/PWM_FullConfiguration.ino

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@
1919

2020
// 'pin' PWM will be managed automatically by hardware whereas 'pin2' PWM will be managed by software through interrupt callback
2121
#if defined(LED_BUILTIN)
22-
#define pin LED_BUILTIN
22+
#define pin LED_BUILTIN
2323

24-
#if LED_BUILTIN == D3
25-
#error LED_BUILTIN == D3
26-
#else
27-
#define pin2 D3
28-
#endif
24+
#if LED_BUILTIN == D3
25+
#define pin2 D2
26+
#else
27+
#define pin2 D3
28+
#endif
2929

3030
#else
31-
#define pin D2
32-
#define pin2 D3
31+
#define pin D2
32+
#define pin2 D3
3333
#endif
3434

3535
void Update_IT_callback(void)
@@ -72,4 +72,4 @@ void setup()
7272
void loop()
7373
{
7474
/* Nothing to do all is done by hardware. Even no interrupt required. */
75-
}
75+
}

0 commit comments

Comments
 (0)