From bacddd1d31a5f3de14477914958f27b6f081c125 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 3 Oct 2008 15:10:55 -0300 Subject: Rename macro "bitfield" to "bits" and correct a wrong division. --- src/smi_501.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/smi_501.c') 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) { -- cgit v1.2.3