mirror of
https://github.com/richardghirst/PiBits.git
synced 2025-02-26 19:54:16 +01:00
Fix couldn't calculate correct fequency
This commit is contained in:
parent
ab34d81e53
commit
96756b1aaa
@ -262,7 +262,7 @@ main(int argc, char **argv)
|
||||
|
||||
// Calculate the frequency control word
|
||||
// The fractional part is stored in the lower 12 bits
|
||||
freq_ctl = ((float)(PLLFREQ / CARRIERFREQ)) * ( 1 << 12 );
|
||||
freq_ctl = ((float)((float)PLLFREQ / (float)CARRIERFREQ)) * ( 1 << 12 );
|
||||
|
||||
dma_reg = map_peripheral(DMA_BASE, DMA_LEN);
|
||||
pwm_reg = map_peripheral(PWM_BASE, PWM_LEN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user