Skip to content

Commit 16e7fb8

Browse files
committed
Add analogRead support
1 parent aa8510d commit 16e7fb8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

PortentaBreakoutCarrier.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ class BreakoutCarrierClass {
197197
}
198198
return;
199199
}
200+
int analogRead(breakoutPin pin) {
201+
if (pin > -1) {
202+
return ::analogRead((int)pin);
203+
}
204+
return -1;
205+
}
200206
MbedI2C I2C_0;
201207
MbedI2C I2C_1;
202208
MbedI2C I2C_2;

0 commit comments

Comments
 (0)