driver: ltc2631
This commit is contained in:
@@ -147,13 +147,13 @@ void ad9833_setMode(ad9833_handle_t *hfg, AD_mode_t mode)
|
||||
static uint32_t ad9833_calcFreq(float f)
|
||||
// Calculate register value for AD9833 frequency register from a frequency
|
||||
{
|
||||
return (uint32_t)((f * AD_2POW28 / AD_MCLK) + 0.5);
|
||||
return (uint32_t)((f * AD_2POW28 / AD_MCLK) + 0.5f);
|
||||
}
|
||||
|
||||
static uint16_t ad9833_calcPhase(float a)
|
||||
// Calculate the value for AD9833 phase register from given phase in tenths of a degree
|
||||
{
|
||||
return (uint16_t)((512.0 * (a / 10) / 45) + 0.5);
|
||||
return (uint16_t)((512.0f * (a / 10) / 45) + 0.5f);
|
||||
}
|
||||
|
||||
void ad9833_setFrequency(ad9833_handle_t *hfg, AD_channel_t chan, float freq)
|
||||
|
||||
Reference in New Issue
Block a user