Loading...
Searching...
No Matches
saul_bat_voltage_params_t Struct Reference

SAUL battery voltage configuration values. More...

Detailed Description

SAUL battery voltage configuration values.

Definition at line 33 of file bat_voltage.h.

#include <bat_voltage.h>

Data Fields

const char * name
 name of the device connected to this pin
 
int8_t phydat_scale
 Phydat scale of the resulting voltage.
 
adc_t line
 ADC line to initialize and expose.
 
adc_res_t res
 ADC resolution.
 
int16_t(* convert )(int32_t adc_sample)
 Conversion function to convert raw ADC data to voltage.
 

Field Documentation

◆ convert

int16_t(* saul_bat_voltage_params_t::convert) (int32_t adc_sample)

Conversion function to convert raw ADC data to voltage.

Parameters
[in]adc_sampleThe raw ADC sample.
Returns
Voltage value for phydat.

Definition at line 45 of file bat_voltage.h.

◆ line

adc_t saul_bat_voltage_params_t::line

ADC line to initialize and expose.

Definition at line 36 of file bat_voltage.h.

◆ name

const char* saul_bat_voltage_params_t::name

name of the device connected to this pin

Definition at line 34 of file bat_voltage.h.

◆ phydat_scale

int8_t saul_bat_voltage_params_t::phydat_scale

Phydat scale of the resulting voltage.

Definition at line 35 of file bat_voltage.h.

◆ res

adc_res_t saul_bat_voltage_params_t::res

ADC resolution.

Definition at line 37 of file bat_voltage.h.


The documentation for this struct was generated from the following file: