Skip to content

Commit 5a40f2d

Browse files
ouoamfpistm
authored andcommitted
U5: Add ADC 14bit support
1 parent 449839e commit 5a40f2d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cores/arduino/wiring_analog.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ extern "C" {
2929
uint32_t g_anOutputPinConfigured[MAX_NB_PORT] = {0};
3030
#endif
3131

32-
#if !defined(ADC_RESOLUTION_16B)
33-
#define MAX_ADC_RESOLUTION 12
34-
#else
32+
#if defined(ADC_RESOLUTION_16B)
3533
#define MAX_ADC_RESOLUTION 16
34+
#elif defined(ADC_RESOLUTION_14B)
35+
#define MAX_ADC_RESOLUTION 14
36+
#else
37+
#define MAX_ADC_RESOLUTION 12
3638
#endif
3739
#define MAX_PWM_RESOLUTION 16
3840

0 commit comments

Comments
 (0)