diff options
Diffstat (limited to 'src/smi_501.c')
-rw-r--r-- | src/smi_501.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/smi_501.c b/src/smi_501.c index 19f6368..17239b2 100644 --- a/src/smi_501.c +++ b/src/smi_501.c @@ -682,7 +682,7 @@ SMI501_FindPLLClock(double clock, int32_t *m, int32_t *n, int32_t *xclck) best = 0x7fffffff; for (N = 2; N <= 24; N++) { for (K = 1; K <= 2; K++) { - M = (clock * K) * N / 24 / 1000.0; + M = clock * K * N / 24 / 1000.0; diff = (24 * 1000.0 * M / N) - (clock * K); /* Ensure M is larger then 0 and fits in 7 bits */ if (M > 0 && M < 0x80 && fabs(diff) < best) { |