aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorUwe Hermann2010-01-14 19:34:30 +0100
committerUwe Hermann2010-01-14 19:34:30 +0100
commit312db1a301305bc7a1e253405d4deb41d5b3fb2b (patch)
tree3fc2fb1f90ae7de3a86f5fd07738a669ef1eb744 /lib
parent977f0ef6a0064f54d8c85419148e9d39e1677351 (diff)
Fix logic bugs in rcc_wait_for_osc_ready().
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
Diffstat (limited to 'lib')
-rw-r--r--lib/rcc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rcc.c b/lib/rcc.c
index 8781562..58ab8b5 100644
--- a/lib/rcc.c
+++ b/lib/rcc.c
@@ -121,19 +121,19 @@ void rcc_wait_for_osc_ready(osc_t osc)
{
switch (osc) {
case PLL:
- while ((RCC_CR & PLLRDY) != 0);
+ while ((RCC_CR & PLLRDY) == 0);
break;
case HSE:
- while ((RCC_CR & HSERDY) != 0);
+ while ((RCC_CR & HSERDY) == 0);
break;
case HSI:
- while ((RCC_CR & HSIRDY) != 0);
+ while ((RCC_CR & HSIRDY) == 0);
break;
case LSE:
- while ((RCC_BDCR & LSERDY) != 0);
+ while ((RCC_BDCR & LSERDY) == 0);
break;
case LSI:
- while ((RCC_CSR & LSIRDY) != 0);
+ while ((RCC_CSR & LSIRDY) == 0);
break;
}
}