diff --git a/examples/stm32/f4/stm32f4-disco/blink/Makefile b/examples/stm32/f4/stm32f4-disco/blink/Makefile deleted file mode 100644 index d41c681..0000000 --- a/examples/stm32/f4/stm32f4-disco/blink/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# -# This file is part of the libopencm3 project. -# -# This library is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this library. If not, see . -# - -BINARY = blink - -LDSCRIPT = ../stm32f4-disco.ld - -include ../../Makefile.include diff --git a/examples/stm32/f4/stm32f4-disco/blink/README b/examples/stm32/f4/stm32f4-disco/blink/README deleted file mode 100644 index 66543ab..0000000 --- a/examples/stm32/f4/stm32f4-disco/blink/README +++ /dev/null @@ -1,8 +0,0 @@ -README ------- - -The "HelloWorld" of embedded systems. This code is really really simple, -it sets up the system clock at a known frequency (168Mhz) and enables -a GPIO pin as an output, that happens to be connected to an LED. And it -blinks it on and off. - diff --git a/examples/stm32/f4/stm32f4-disco/blink/blink.c b/examples/stm32/f4/stm32f4-disco/blink/blink.c deleted file mode 100644 index 97ae250..0000000 --- a/examples/stm32/f4/stm32f4-disco/blink/blink.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2014 Chuck McManis (cmcmanis@mcmanis.com) - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see . - */ - -#include -#include - -#define GREEN_LED GPIO13 -#define RED_LED GPIO13 - -int main(void) -{ - int i; - - /* Use parameters to set the STM32 clock to 168 MHz. */ - rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]); - - /* Enable GPIOG clock. (this enables the pins to work) */ - rcc_periph_clock_enable(RCC_GPIOG); - - /* Set the "mode" of the GPIO pin to output, no pullups or pulldowns */ - gpio_mode_setup(GPIOG, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GREEN_LED ); - - /* Turn on the GREEN led */ - gpio_set(GPIOG, GREEN_LED); - - /* Blink the GREEN LED on the board. */ - while (1) { - /* Toggle LEDs. */ - gpio_toggle(GPIOG, GREEN_LED); - for (i = 0; i < 10000000; i++) /* Wait a bit. */ - __asm__("nop"); - } - - return 0; -}