File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -114,11 +114,18 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) {
114
114
115
115
// Reference voltage is a fixed value which is depending on the board.
116
116
// e.g.)
117
- // - Reference Voltage of A4 and A5 pins on Main Board is 0.7V.
118
- // - Reference Voltage of A0 ~ A5 pins on External Interface board
119
- // is selected 3.3V or 5.0V by a IO Volt jumper pin.
117
+ // - Reference Voltage of A2 and A3 pins on Main Board is 0.7V.
118
+ // - Reference Voltage of A0 ~ A5 pins on External Interface board is 5.0V
120
119
float common_hal_analogio_analogin_get_reference_voltage (analogio_analogin_obj_t * self ) {
121
- return 0.0f ;
120
+ float voltage ;
121
+
122
+ if (self -> number == 2 || self -> number == 3 ) {
123
+ voltage = 0.0f ;
124
+ } else {
125
+ voltage = 5.0f ;
126
+ }
127
+
128
+ return voltage ;
122
129
}
123
130
124
131
void analogin_reset (void ) {
Original file line number Diff line number Diff line change @@ -10,8 +10,14 @@ USB_MSC_EP_NUM_IN = 4
10
10
# Number of USB endpoint pairs.
11
11
USB_NUM_EP = 6
12
12
13
+ # Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
14
+ # $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
15
+ # This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
13
16
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
14
17
18
+ # Longints can be implemented as mpz, as longlong, or not
19
+ LONGINT_IMPL = MPZ
20
+
15
21
CIRCUITPY_AUDIOBUSIO = 0
16
22
CIRCUITPY_AUDIOIO = 0
17
23
CIRCUITPY_CAMERA = 1
You can’t perform that action at this time.
0 commit comments