Loading...
Searching...
No Matches
tps6274x.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 RWTH Aachen
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#ifdef __cplusplus
22extern "C"
23{
24#endif
25
26#include <inttypes.h>
27#include "periph/gpio.h"
28
32typedef struct {
33 gpio_t vsel[4];
34 gpio_t ctrl_pin;
36
40typedef struct {
43
47enum {
50};
51
61
69uint16_t tps6274x_switch_voltage(tps6274x_t *dev, uint16_t voltage);
70
77void tps6274x_load_ctrl(tps6274x_t *dev, int status);
78
79#ifdef __cplusplus
80}
81#endif
Low-level GPIO peripheral driver interface definitions.
int tps6274x_init(tps6274x_t *dev, const tps6274x_params_t *params)
Init converter.
uint16_t tps6274x_switch_voltage(tps6274x_t *dev, uint16_t voltage)
Switch to different voltage level.
void tps6274x_load_ctrl(tps6274x_t *dev, int status)
Sets ctrl pin high to power a subsystem connected on the load pin.
@ TPS6274X_ERR_INIT
error during init
Definition tps6274x.h:49
@ TPS6274X_OK
everything was fine
Definition tps6274x.h:48
Adds include for missing inttype definitions.
TPS6274x Configuration struct.
Definition tps6274x.h:32
gpio_t vsel[4]
select line pin mapping
Definition tps6274x.h:33
gpio_t ctrl_pin
ctrl pin mapping
Definition tps6274x.h:34
Device descriptor for the TPS6274x.
Definition tps6274x.h:40
tps6274x_params_t params
device initialization parameters
Definition tps6274x.h:41