Skip to content

Commit 0d4a9f2

Browse files
committed
build fix for non pico boards
1 parent 4005af1 commit 0d4a9f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adc/read_vsys/power_status.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int power_source(bool *battery_powered) {
3535
int power_voltage(float *voltage_result) {
3636
#ifndef PICO_VSYS_PIN
3737
return PICO_ERROR_NO_DATA;
38-
#endif
38+
#else
3939
#if CYW43_USES_VSYS_PIN
4040
cyw43_thread_enter();
4141
// Make sure cyw43 is awake
@@ -73,4 +73,5 @@ int power_voltage(float *voltage_result) {
7373
const float conversion_factor = 3.3f / (1 << 12);
7474
*voltage_result = vsys * 3 * conversion_factor;
7575
return PICO_OK;
76+
#endif
7677
}

0 commit comments

Comments
 (0)