|
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) |
|
This is the TPS65381 Driver.
- Todo:
- Implement Watchdog
◆ 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
|
◆ tps_deinit()
int32_t tps_deinit |
( |
struct tps65381 * |
tps | ) |
|
Deinit TPS65381
- Parameters
-
- 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
-
tps | TPS65381 Instance |
diag | Mux this Pin |
adc | ADC Pin |
waittime | max 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
-
slave | SPI Slave Instance |
waittime | max 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
-
tps | TPS65381 Instance |
diag | Mux this Pin |
waittime | max waittime in mutex or isr lock see xSemaphoreTake() |
- Returns
- -1 on error 0 on ok