[riot-notifications] [boards] Telosb support (#26)

Christian Mehlis notifications at github.com
Tue Aug 27 17:06:07 CEST 2013


> +
> +    /* Init undivided DCO with internal resistor for MCLK and SMCLK
> +     * DCO = 32762Hz -> FLL = 2,4576 MHz */
> +    BCSCTL2 = 0x00;
> +
> +    BCSCTL1 |= DIVA1 + DIVA0;             /* ACLK = LFXT1CLK/8 */
> +
> +    for (i = 0xFFFF; i > 0; i--) {        /* Delay for XTAL to settle */
> +        asm("nop");
> +    }
> +
> +    CCTL2 = CCIS0 + CM0 + CAP;            /* Define CCR2, CAP, ACLK */
> +    TACTL = TASSEL1 + TACLR + MC1;        /* SMCLK, continous mode */
> +
> +    while (1) {
> +        while ((CCTL2 & CCIFG) != CCIFG);   /* Wait until capture occured!*/

please do this busy loop in a more expressive way, perhaps:
```
while ((CCTL2 & CCIFG) != CCIFG) {
    ; /* busy looping until capture occured!*/ 
}
```

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/boards/pull/26/files#r6007397
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130827/5b228cbc/attachment.html>


More information about the notifications mailing list