Hardware Abstraction Layer for FreeRTOS
Collaboration diagram for TPS65381 driver:

Enumerations

enum  tps_diag {
  TPS_VDD5, TPS_VDD6, TPS_VCP, TPS_VSOUT1,
  TPS_VBAT_SAFING, TPS_VBAT, TPS_MAIN_BG, TPS_VMON_BG
}
 

Functions

struct tps65381 * tps_init (struct spi_slave *slave, TickType_t waittime)
 
int32_t tps_deinit (struct tps65381 *tps)
 
int32_t tps_mux (struct tps65381 *tps, enum tps_diag diag, TickType_t waittime)
 
float tps_diag (struct tps65381 *tps, enum tps_diag diag, struct adc *adc, TickType_t waittime)
 

Detailed Description

#include <tps65381.h>

This is the TPS65381 Driver.

Todo:
Implement Watchdog

Enumeration Type Documentation

◆ tps_diag

enum tps_diag

Select Voltage forwood to Diag Pin

Enumerator
TPS_VDD5 

VDD5

TPS_VDD6 

VDD6

TPS_VCP 

VCP

TPS_VSOUT1 

VSOut 1

TPS_VBAT_SAFING 

VBAT Safing

TPS_VBAT 

VBAT

TPS_MAIN_BG 

Main BG

TPS_VMON_BG 

VMON BG

Function Documentation

◆ tps_deinit()

int32_t tps_deinit ( struct tps65381 *  tps)

Deinit TPS65381

Parameters
tpsTPS65381 Instance
Returns
-1 on error 0 on ok

◆ tps_diag()

float tps_diag ( struct tps65381 *  tps,
enum tps_diag  diag,
struct adc *  adc,
TickType_t  waittime 
)

Measurement Diag Pin

Parameters
tpsTPS65381 Instance
diagMux this Pin
adcADC Pin
waittimemax waittime in mutex or isr lock see xSemaphoreTake()
Returns
Voltage on Diag Pin

◆ tps_init()

struct tps65381* tps_init ( struct spi_slave *  slave,
TickType_t  waittime 
)

Init TPS65381

Parameters
slaveSPI Slave Instance
waittimemax waittime in mutex or isr lock see xSemaphoreTake()
Returns
TPS65381 Instance or NULL on error

◆ tps_mux()

int32_t tps_mux ( struct tps65381 *  tps,
enum tps_diag  diag,
TickType_t  waittime 
)

Mux Diag Pin

Parameters
tpsTPS65381 Instance
diagMux this Pin
waittimemax waittime in mutex or isr lock see xSemaphoreTake()
Returns
-1 on error 0 on ok
tps65381.h