Select one of the symbols to view example projects that use it.
 
Outline
#define POWER_STATUS_H
power_source(bool *);
power_voltage(float *);
Files
loading...
SourceVuRaspberry Pi Pico SDK and Examplesread_vsys samplepower_status.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** * Copyright (c) 2023 Raspberry Pi (Trading) Ltd. * * SPDX-License-Identifier: BSD-3-Clause *//* ... */ #ifndef POWER_STATUS_H #define POWER_STATUS_H /*! * \brief Get power source * * Returns whether battery powered * \note On Pico W must have called cyw43_arch_init * * \param battery_powered True if powered by battery, False if powered by USB or another means * \return Zero if the battery status can be determined, an error code otherwise \see pico_error_codes *//* ... */ int power_source(bool *battery_powered); /*! * \brief Get system voltage * * Returns the system voltage * \note Must have called adc_init * * \param voltage Calculated voltage * \return Zero if the voltage can be determined, an error code otherwise \see pico_error_codes *//* ... */ int power_voltage(float *voltage); /* ... */ #endif
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.