Skip to content

Commit 06e0d22

Browse files
committed
cores: Add API guards to overloads.h for consistent with other parts
Add #pragma once and align analogReadResolution() / analogWriteResolution() declaration guards with existing CONFIG_* usage. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent f2e330c commit 06e0d22

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cores/arduino/overloads.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,14 @@ void analogWrite(enum dacPins pinNumber, int value);
1313
#endif
1414

1515
// In c++ mode, we also provide analogReadResolution and analogWriteResolution getters
16+
#ifdef CONFIG_ADC
17+
1618
int analogReadResolution();
19+
20+
#endif
21+
22+
#if defined(CONFIG_PWM) || defined(CONFIG_DAC)
23+
1724
int analogWriteResolution();
25+
26+
#endif

0 commit comments

Comments
 (0)