fixed warnings

This commit is contained in:
maliakal_d 2022-11-18 11:19:01 +01:00
parent 33e2155db1
commit 2dcf4a7144
2 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ int ALTERA_PLL_SetOuputFrequency(int clkIndex, int pllVCOFreqMhz, int value) {
clkIndex, value, pllVCOFreqMhz));
// calculate output frequency
int total_div = (float)pllVCOFreqMhz / (float)value;
uint32_t total_div = (float)pllVCOFreqMhz / (float)value;
// assume 50% duty cycle
uint32_t low_count = total_div / 2;

View File

@ -172,7 +172,7 @@ void ALTERA_PLL_C10_SetOuputClockDivider(int pllIndex, int clkIndex,
uint32_t odd_division = 0;
// odd division
if (value > (2 * low_count)) {
if (value > (int)(2 * low_count)) {
++high_count;
odd_division = 1;
}