Loading...
Searching...
No Matches
bat_voltage_params.h File Reference

Configuration of SAUL mapped battery voltage information. More...

Detailed Description

Configuration of SAUL mapped battery voltage information.

Author
Martine S. Lenders marti.nosp@m.ne.l.nosp@m.ender.nosp@m.s@tu.nosp@m.-dres.nosp@m.den..nosp@m.de

Definition in file bat_voltage_params.h.

#include "saul/bat_voltage.h"
+ Include dependency graph for bat_voltage_params.h:

Go to the source code of this file.

static const saul_bat_voltage_params_t saul_bat_voltage_params []
 Battery voltage configuration.
 
int16_t saul_bat_voltage_convert (int32_t adc_sample)
 Conversion function to convert ADC sample to battery voltage.
 

Function Documentation

◆ saul_bat_voltage_convert()

int16_t saul_bat_voltage_convert ( int32_t  adc_sample)

Conversion function to convert ADC sample to battery voltage.

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

Variable Documentation

◆ saul_bat_voltage_params

const saul_bat_voltage_params_t saul_bat_voltage_params[]
static
Initial value:
=
{
{
.name = "BAT",
.phydat_scale = -3,
.line = ADC_LINE(3),
.res = ADC_RES_10BIT,
},
}
int16_t saul_bat_voltage_convert(int32_t adc_sample)
Conversion function to convert ADC sample to battery voltage.
#define ADC_LINE(x)
Default ADC line access macro.
Definition adc.h:86
@ ADC_RES_10BIT
ADC resolution: 10 bit.
Definition adc.h:96

Battery voltage configuration.

Definition at line 40 of file bat_voltage_params.h.