@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
vreg.h
Go to the documentation of this file.
/*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef _HARDWARE_VREG_H
#define _HARDWARE_VREG_H
#include "pico.h"
#if PICO_RP2040
#include "hardware/structs/vreg_and_chip_reset.h"
#else
#include "hardware/structs/powman.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
enum vreg_voltage {
#if !PICO_RP2040
VREG_VOLTAGE_0_55 = 0b00000,
VREG_VOLTAGE_0_60 = 0b00001,
VREG_VOLTAGE_0_65 = 0b00010,
VREG_VOLTAGE_0_70 = 0b00011,
VREG_VOLTAGE_0_75 = 0b00100,
VREG_VOLTAGE_0_80 = 0b00101,
#endif
VREG_VOLTAGE_0_85 = 0b00110,
VREG_VOLTAGE_0_90 = 0b00111,
VREG_VOLTAGE_0_95 = 0b01000,
VREG_VOLTAGE_1_00 = 0b01001,
VREG_VOLTAGE_1_05 = 0b01010,
VREG_VOLTAGE_1_10 = 0b01011,
VREG_VOLTAGE_1_15 = 0b01100,
VREG_VOLTAGE_1_20 = 0b01101,
VREG_VOLTAGE_1_25 = 0b01110,
VREG_VOLTAGE_1_30 = 0b01111,
#if !PICO_RP2040
// Above this point you will need to set POWMAN_VREG_CTRL_DISABLE_VOLTAGE_LIMIT
VREG_VOLTAGE_1_35 = 0b10000,
VREG_VOLTAGE_1_40 = 0b10001,
VREG_VOLTAGE_1_50 = 0b10010,
VREG_VOLTAGE_1_60 = 0b10011,
VREG_VOLTAGE_1_65 = 0b10100,
VREG_VOLTAGE_1_70 = 0b10101,
VREG_VOLTAGE_1_80 = 0b10110,
VREG_VOLTAGE_1_90 = 0b10111,
VREG_VOLTAGE_2_00 = 0b11000,
VREG_VOLTAGE_2_35 = 0b11001,
VREG_VOLTAGE_2_50 = 0b11010,
VREG_VOLTAGE_2_65 = 0b11011,
VREG_VOLTAGE_2_80 = 0b11100,
VREG_VOLTAGE_3_00 = 0b11101,
VREG_VOLTAGE_3_15 = 0b11110,
VREG_VOLTAGE_3_30 = 0b11111,
#endif
// Note the "max" here assumes that VREG_CTRL_DISABLE_VOLTAGE_LIMIT is not set
VREG_VOLTAGE_MIN = VREG_VOLTAGE_0_85,
VREG_VOLTAGE_DEFAULT = VREG_VOLTAGE_1_10,
VREG_VOLTAGE_MAX = VREG_VOLTAGE_1_30,
};
void vreg_set_voltage(enum vreg_voltage voltage);
enum vreg_voltage vreg_get_voltage(void);
void vreg_disable_voltage_limit(void);
#ifdef __cplusplus
}
#endif
#endif
vreg_get_voltage
enum vreg_voltage vreg_get_voltage(void)
Get voltage.
Definition vreg.c:38
vreg_set_voltage
void vreg_set_voltage(enum vreg_voltage voltage)
Set voltage.
Definition vreg.c:10
vreg_disable_voltage_limit
void vreg_disable_voltage_limit(void)
Enable use of voltages beyond the safe range of operation.
Definition vreg.c:46
pico.h
vreg_voltage
vreg_voltage
Definition vreg.h:31
VREG_VOLTAGE_1_00
@ VREG_VOLTAGE_1_00
1.00 V
Definition vreg.h:43
VREG_VOLTAGE_1_15
@ VREG_VOLTAGE_1_15
1.15 V
Definition vreg.h:46
VREG_VOLTAGE_1_30
@ VREG_VOLTAGE_1_30
1.30 V
Definition vreg.h:49
VREG_VOLTAGE_DEFAULT
@ VREG_VOLTAGE_DEFAULT
Default voltage on power up.
Definition vreg.h:72
VREG_VOLTAGE_1_25
@ VREG_VOLTAGE_1_25
1.25 V
Definition vreg.h:48
VREG_VOLTAGE_1_20
@ VREG_VOLTAGE_1_20
1.20 V
Definition vreg.h:47
VREG_VOLTAGE_MIN
@ VREG_VOLTAGE_MIN
Always the minimum possible voltage.
Definition vreg.h:71
VREG_VOLTAGE_0_85
@ VREG_VOLTAGE_0_85
0.85 V
Definition vreg.h:40
VREG_VOLTAGE_0_95
@ VREG_VOLTAGE_0_95
0.95 V
Definition vreg.h:42
VREG_VOLTAGE_MAX
@ VREG_VOLTAGE_MAX
Always the maximum possible voltage.
Definition vreg.h:73
VREG_VOLTAGE_1_05
@ VREG_VOLTAGE_1_05
1.05 V
Definition vreg.h:44
VREG_VOLTAGE_0_90
@ VREG_VOLTAGE_0_90
0.90 V
Definition vreg.h:41
VREG_VOLTAGE_1_10
@ VREG_VOLTAGE_1_10
1.10 V
Definition vreg.h:45