[riot-notifications] [RIOT] board/Nucleo-f303: initial support for the Nucleo-f303 (#3165)

Peter Kietzmann notifications at github.com
Fri Jun 5 09:25:11 CEST 2015


> +static void leds_init(void)
> +{
> +    /* enable clock for port GPIOA */
> +    RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
> +    /* set output speed to 50MHz */
> +    LED_GREEN_PORT->OSPEEDR |= 0x00000c00;
> +    /* set output type to push-pull */
> +    LED_GREEN_PORT->OTYPER &= ~(0x00000020);
> +    /* configure pin as general output */
> +    LED_GREEN_PORT->MODER &= ~(0x00000c00);
> +    LED_GREEN_PORT->MODER |= 0x00000400;
> +    /* disable pull resistors */
> +    LED_GREEN_PORT->PUPDR &= ~(0x00000c00);
> +    /* turn all LEDs off */
> +    LED_GREEN_PORT->BRR = 0x00c0;
> +}

Did you test the LED?

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


More information about the notifications mailing list