Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 8825214

Browse files
committed
Fix macro
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent e4c55cd commit 8825214

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

variants/otto/variant.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ enum {
7474
// Convert a digital pin number Dxx to a PinName Pxy
7575
#define digitalToPinName(p) ((p < NUM_DIGITAL_PINS) ? digital_arduino[p] : (STM_VALID_PINNAME(p))? (PinName)p : NC)
7676
// Convert an analog pin number Axx to a PinName Pxy
77-
#define analogToPinName(p) ((p < NUM_ANALOG_INPUTS) ? digitalToPinName(p+A0) : digitalToPinName(p))
77+
#define analogToPinName(p) (digitalToPinName(p))
7878
// Convert an analog pin number to a digital pin number
79-
#define analogToDigital(p) ((p < NUM_ANALOG_INPUTS) ? (p+A0) : p)
79+
#define analogToDigital(p) (p)
8080
// Convert a PinName Pxy to a pin number
8181
uint32_t pinNametoPinNumber(PinName p);
8282

0 commit comments

Comments
 (0)