Skip to content

Commit 456f9c5

Browse files
hfakkizEricB-ADI
authored andcommitted
fix(PeriphDrivers): Fix build warnings for MAX78002 ADC (#1235)
Signed-off-by: Furkan Akkiz <[email protected]>
1 parent 67d4b0a commit 456f9c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Libraries/PeriphDrivers/Source/ADC/adc_ai87.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
*/
3838

3939
#define MXC_F_MCR_ADCCFG2_CH 0x3
40-
#define TEMP_FACTOR 530.582f / 4096.0
41-
#define TEMP_FACTOR1V25 1.25 * TEMP_FACTOR
42-
#define TEMP_FACTOR2V048 2.048 * TEMP_FACTOR
40+
#define TEMP_FACTOR 530.582f / 4096.0f
41+
#define TEMP_FACTOR1V25 1.25f * TEMP_FACTOR
42+
#define TEMP_FACTOR2V048 2.048f * TEMP_FACTOR
4343

4444
static void initGPIOForChannel(mxc_adc_chsel_t channel)
4545
{
@@ -397,7 +397,7 @@ int MXC_ConvertTemperature_ToF(uint16_t tempSensor_Readout, mxc_adc_refsel_t ref
397397
float *temp)
398398
{
399399
if (MXC_ConvertTemperature_ToK(tempSensor_Readout, ref, ext_ref, temp) == E_NO_ERROR) {
400-
*temp = ((*temp * 1.8) - 459.67f);
400+
*temp = (*temp * 1.8f) - 459.67f;
401401
return E_NO_ERROR;
402402
} else {
403403
return E_BAD_PARAM;

0 commit comments

Comments
 (0)