Device driver interface for the TPS6274x DC-DC Converter. More...

Detailed Description

Device driver interface for the TPS6274x DC-DC Converter.

Files

file  tps6274x.h
 Device driver interface for the TPS6274x DC-DC Converter.
 
file  tps6274x_params.h
 Default configuration for TPS6274x DC-DC Converter.
 

Data Structures

struct  tps6274x_params_t
 TPS6274x Configuration struct. More...
 
struct  tps6274x_t
 Device descriptor for the TPS6274x. More...
 

Enumerations

enum  { TPS6274X_OK = 0, TPS6274X_ERR_INIT }
 Status and error return codes. More...
 

Functions

int tps6274x_init (tps6274x_t *dev, const tps6274x_params_t *params)
 Init converter. More...
 
uint16_t tps6274x_switch_voltage (tps6274x_t *dev, uint16_t voltage)
 Switch to different voltage level. More...
 
void tps6274x_load_ctrl (tps6274x_t *dev, int status)
 Sets ctrl pin high to power a subsystem connected on the load pin. More...
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Status and error return codes.

Enumerator
TPS6274X_OK 

everything was fine

TPS6274X_ERR_INIT 

error during init

Definition at line 51 of file tps6274x.h.

Function Documentation

◆ tps6274x_init()

int tps6274x_init ( tps6274x_t dev,
const tps6274x_params_t params 
)

Init converter.

Parameters
[in]devInitialized device descriptor for TPS6274x device
[in]paramsInitialization parameters
Returns
set voltage in mV

◆ tps6274x_load_ctrl()

void tps6274x_load_ctrl ( tps6274x_t dev,
int  status 
)

Sets ctrl pin high to power a subsystem connected on the load pin.

Parameters
[in]devDevice descriptor for TPS6274x device
[in]status0 will disable the load, everything else will activate it

◆ tps6274x_switch_voltage()

uint16_t tps6274x_switch_voltage ( tps6274x_t dev,
uint16_t  voltage 
)

Switch to different voltage level.

Parameters
[in]devDevice descriptor for TPS6274x device
[in]voltageVoltage to set in mV (needs to be between 1.8V-3.3V
Returns
the voltage that was set in mV