Closed akadamson closed 8 years ago
Jason, I think you may want to make these changes to the set_clock_disable routine. It looks like you copy & pasted and forgot to change some if, ifelse
void Si5351::set_clock_disable(enum si5351_clock clk, enum si5351_clock_disable dis_state) { uint8_t reg_val = 0, reg = 0;
if (clk >= SI5351_CLK0 && clk <= SI5351_CLK3) { reg = SI5351_CLK3_0_DISABLE_STATE; } else if (clk >= SI5351_CLK4 && clk <= SI5351_CLK7) { reg = SI5351_CLK7_4_DISABLE_STATE; } reg_val = si5351_read(reg); if (clk >= SI5351_CLK0 && clk <= SI5351_CLK3) { reg_val &= ~(0b11 << (clk * 2)); reg_val |= dis_state << (clk * 2); } else if (clk >= SI5351_CLK4 && clk <= SI5351_CLK7) { reg_val &= ~(0b11 << ((clk - 4) * 2)); reg_val |= dis_state << ((clk - 4) * 2); } si5351_write(reg, reg_val);
}
Always appreciate the extra eyes to catch bugs like these. Corrected in release v1.1.1.
Jason, I think you may want to make these changes to the set_clock_disable routine. It looks like you copy & pasted and forgot to change some if, ifelse
void Si5351::set_clock_disable(enum si5351_clock clk, enum si5351_clock_disable dis_state) { uint8_t reg_val = 0, reg = 0;
}