Loading...
Searching...
No Matches
tps6274x.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 RWTH Aachen
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
22#ifndef TPS6274X_H
23#define TPS6274X_H
24
25#ifdef __cplusplus
26extern "C"
27{
28#endif
29
30#include <inttypes.h>
31#include "periph/gpio.h"
32
36typedef struct {
37 gpio_t vsel[4];
38 gpio_t ctrl_pin;
40
44typedef struct {
47
51enum {
54};
55
65
73uint16_t tps6274x_switch_voltage(tps6274x_t *dev, uint16_t voltage);
74
81void tps6274x_load_ctrl(tps6274x_t *dev, int status);
82
83#ifdef __cplusplus
84}
85#endif
86#endif /* TPS6274X_H */
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:53
@ TPS6274X_OK
everything was fine
Definition tps6274x.h:52
Adds include for missing inttype definitions.
TPS6274x Configuration struct.
Definition tps6274x.h:36
gpio_t ctrl_pin
ctrl pin mapping
Definition tps6274x.h:38
Device descriptor for the TPS6274x.
Definition tps6274x.h:44
tps6274x_params_t params
device initialization parameters
Definition tps6274x.h:45