|
foxBMS-UnitTests
1.0.0
The foxBMS Unit Tests API Documentation
|
Go to the documentation of this file.
66 #define ADC_TEMPERATURE_FACTOR (10.0f)
122 {0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u};
126 {0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u, 0x0000u};
180 float temperature_degC = 0.0f;
189 return (10.0f * temperature_degC);
201 for (uint8_t i = 0u; i < 20u; i++) {
DATA_BLOCK_HEADER_s header
#define BS_NR_OF_TEMP_SENSORS_ON_ADC0
@ ADC0_TEMPERATURE_SENSOR
int16_t TS_Epc00GetTemperatureFromLut(uint16_t adcVoltage_mV)
returns temperature based on measured ADC voltage
SPI_INTERFACE_CONFIG_s spi_adc0Interface
void ADC_Control(void)
determines which ADC is measured and stores result in database.
int16_t temperatureAdc0_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC0]
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
Headers for the driver for the SPI module.
static uint16_t adc_txWakeupCommand[SINGLE_MESSAGE_LENGTH]
static STD_RETURN_TYPE_e ADC_Transmit(uint32 blocksize, uint16 *pTxBuffer, uint16 *pRxBuffer, SPI_INTERFACE_CONFIG_s *pSpiInterface)
#define DATA_WRITE_DATA(...)
Resistive divider used for measuring temperature.
Headers for the driver for the ADC module.
static float ADC_ConvertVoltagesToTemperatures(float v_adc_V, ADC_TEMPERATURE_SENSOR_TYPE_e TsensorType)
converts a raw voltage from ADC to a temperature value in Celsius.
static uint16_t adc_txUnlockCommand[SINGLE_MESSAGE_LENGTH]
static uint8_t adc_conversionState
describes the current state of the conversion
static uint16_t adc_txWriteRegisterCommand[SINGLE_MESSAGE_LENGTH]
ADC_TEMPERATURE_SENSOR_TYPE
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
static uint16_t adc_txLockCommand[SINGLE_MESSAGE_LENGTH]
STD_RETURN_TYPE_e SPI_TransmitReceiveData(SPI_INTERFACE_CONFIG_s *pSpiInterface, uint16 *pTxBuff, uint16 *pRxBuff, uint32 frameLength)
Transmits and receives data on SPI without DMA.
void ADC_Initialize(void)
initializes the ADC devices. It is called during startup.
static uint16_t adc_rxReadSingleMessage[SINGLE_MESSAGE_LENGTH]
@ DATA_BLOCK_ID_ADC_TEMPERATURE
static uint16_t adc_rxConvert[CONVERT_LENGTH]
SPI_INTERFACE_CONFIG_s spi_adc1Interface
#define ADC_NUMBER_OF_CHANNELS
static uint16_t adc_txNull[SINGLE_MESSAGE_LENGTH]
void IO_PinReset(uint32_t *pRegisterAddress, uint32_t pin)
Set pin by writing in pin output register.
#define DATA_READ_DATA(...)
#define NULL_PTR
Null pointer.
Header for the driver for the IO module.
static uint16_t adc_txReadRegisterCommand[SINGLE_MESSAGE_LENGTH]
#define BS_NR_OF_TEMP_SENSORS_ON_ADC1
@ ADC1_TEMPERATURE_SENSOR
#define ADC_TEMPERATURE_FACTOR
static uint16_t adc_txConvert[CONVERT_LENGTH]
static float adc_adc1Voltage[4]
int16_t temperatureAdc1_ddegC[BS_NR_OF_TEMP_SENSORS_ON_ADC1]
enum ADC_TEMPERATURE_SENSOR_TYPE ADC_TEMPERATURE_SENSOR_TYPE_e
void IO_PinSet(uint32_t *pRegisterAddress, uint32_t pin)
Set pin by writing in pin output register.
#define FAS_TRAP
Define that evaluates to essential boolean false thus tripping an assert.
#define SINGLE_MESSAGE_LENGTH
int16_t BETA_GetTemperatureFromBeta(uint16_t adcVoltage_mV)
returns temperature based on measured ADC voltage
static DATA_BLOCK_ADC_TEMPERATURE_s adc_tableTemperature
#define ADC_HET1_RESET_PIN
static float adc_adc0Voltage[4]
Resistive divider used for measuring temperature.