heat control
r71
|
Go to the source code of this file.
Functions | |
void | AdcInit (void) |
initialize the adc resource More... | |
ISR (ADC_vect) | |
ADC interrupt service. More... | |
void | ProcessNextConversion (void) |
checks whether all converted values are processed and starts a new ADC conversion if the latter evaluates to TRUE More... | |
void | StartAdcConversion (void) |
start AD conversion, this will trigger the conversion of all selected channels via the interrupt More... | |
void | SetMux (UCHAR ch) |
set multiplexer thus switching between channels More... | |
UINT | CalcAdcTemp (UCHAR id) |
calculate the temperature from specific ADC value in data array, specified by id More... | |
UINT | CalcSupplyVoltage (UCHAR id) |
Variables | |
UINT | g_adcData [ADC_INPUTS] |
UCHAR volatile | g_adcConverting = FALSE |
UCHAR volatile | g_justMuxed = FALSE |
void AdcInit | ( | void | ) |
calculate the temperature from specific ADC value in data array, specified by id
id | for data array cell to get the temperature for |
Definition at line 107 of file adc.c.
References A1, ADC_MEAN_VALUES, ADC_REF_VOLTAGE, ADC_RES, ADC_TMP_INNER_ID, B1, C1, D1, g_adcConverting, g_adcData, INVALID_VAL_U16, ProcessNextConversion(), REV_CURRENT_VALUE, RR_IN, RR_OUT, and UINT.
Referenced by main().
Definition at line 126 of file adc.c.
References ADC_MEAN_VALUES, ADC_REF_VOLTAGE, ADC_RES, ADC_SUP_DIV_FCT, g_adcConverting, g_adcData, INVALID_VAL_U16, ProcessNextConversion(), and UINT.
Referenced by main().
ISR | ( | ADC_vect | ) |
ADC interrupt service.
ADC_vect | adc interrupt vector |
Definition at line 41 of file adc.c.
References ADC_INPUTS, ADC_MEAN_VALUES, FALSE, g_adcConverting, g_adcData, g_justMuxed, SetMux(), StartAdcConversion(), and UCHAR.
void ProcessNextConversion | ( | void | ) |
checks whether all converted values are processed and starts a new ADC conversion if the latter evaluates to TRUE
Definition at line 74 of file adc.c.
References ADC_TMP_INNER_ID, ADC_TMP_OUTER_ID, g_adcData, INC_TSEND_INIT, INVALID_VAL_U16, and StartAdcConversion().
Referenced by CalcAdcTemp(), and CalcSupplyVoltage().
void SetMux | ( | UCHAR | ch | ) |
set multiplexer thus switching between channels
ch | adc channel id |
Definition at line 97 of file adc.c.
References ADC_VREF_SEL, FIRST_ADC_INPUT, g_justMuxed, and TRUE.
Referenced by AdcInit(), and ISR().
void StartAdcConversion | ( | void | ) |
start AD conversion, this will trigger the conversion of all selected channels via the interrupt
Definition at line 87 of file adc.c.
References ADC_SR, g_adcConverting, and TRUE.
Referenced by ISR(), and ProcessNextConversion().
flag indicating conversion progress
Definition at line 14 of file adc.c.
Referenced by CalcAdcTemp(), CalcSupplyVoltage(), ISR(), and StartAdcConversion().
UINT g_adcData[ADC_INPUTS] |
list of converted data, according to selected inputs
Definition at line 10 of file adc.c.
Referenced by CalcAdcTemp(), CalcSupplyVoltage(), ISR(), and ProcessNextConversion().