From 34cdefd3d6380404d80fe6848ad1f1cc1406188e Mon Sep 17 00:00:00 2001 From: Furkan Akkiz Date: Mon, 21 Oct 2024 17:58:22 +0300 Subject: [PATCH] Fix build warnings for MAX78002 ADC Fixed build warnings of ADC driver for MAX78002 SoC. Signed-off-by: Furkan Akkiz --- Libraries/PeriphDrivers/Source/ADC/adc_ai87.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/PeriphDrivers/Source/ADC/adc_ai87.c b/Libraries/PeriphDrivers/Source/ADC/adc_ai87.c index 6fa2ec4cf60..7a38c23184d 100644 --- a/Libraries/PeriphDrivers/Source/ADC/adc_ai87.c +++ b/Libraries/PeriphDrivers/Source/ADC/adc_ai87.c @@ -37,9 +37,9 @@ */ #define MXC_F_MCR_ADCCFG2_CH 0x3 -#define TEMP_FACTOR 530.582f / 4096.0 -#define TEMP_FACTOR1V25 1.25 * TEMP_FACTOR -#define TEMP_FACTOR2V048 2.048 * TEMP_FACTOR +#define TEMP_FACTOR 530.582f / 4096.0f +#define TEMP_FACTOR1V25 1.25f * TEMP_FACTOR +#define TEMP_FACTOR2V048 2.048f * TEMP_FACTOR static void initGPIOForChannel(mxc_adc_chsel_t channel) { @@ -397,7 +397,7 @@ int MXC_ConvertTemperature_ToF(uint16_t tempSensor_Readout, mxc_adc_refsel_t ref float *temp) { if (MXC_ConvertTemperature_ToK(tempSensor_Readout, ref, ext_ref, temp) == E_NO_ERROR) { - *temp = ((*temp * 1.8) - 459.67f); + *temp = (*temp * 1.8f) - 459.67f; return E_NO_ERROR; } else { return E_BAD_PARAM;