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
9#pragma once
10
23
24#ifdef __cplusplus
25extern "C"
26{
27#endif
28
29#include <inttypes.h>
30#include "periph/gpio.h"
31
35typedef struct {
36 gpio_t vsel[4];
37 gpio_t ctrl_pin;
39
43typedef struct {
46
50enum {
53};
54
64
72uint16_t tps6274x_switch_voltage(tps6274x_t *dev, uint16_t voltage);
73
80void tps6274x_load_ctrl(tps6274x_t *dev, int status);
81
82#ifdef __cplusplus
83}
84#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:52
@ TPS6274X_OK
everything was fine
Definition tps6274x.h:51
Adds include for missing inttype definitions.
TPS6274x Configuration struct.
Definition tps6274x.h:35
gpio_t vsel[4]
select line pin mapping
Definition tps6274x.h:36
gpio_t ctrl_pin
ctrl pin mapping
Definition tps6274x.h:37
Device descriptor for the TPS6274x.
Definition tps6274x.h:43
tps6274x_params_t params
device initialization parameters
Definition tps6274x.h:44