aboutsummaryrefslogtreecommitdiff
path: root/examples/obldc/led
diff options
context:
space:
mode:
Diffstat (limited to 'examples/obldc/led')
-rw-r--r--examples/obldc/led/Makefile2
-rw-r--r--examples/obldc/led/led.c9
-rw-r--r--examples/obldc/led/led.ld2
3 files changed, 5 insertions, 8 deletions
diff --git a/examples/obldc/led/Makefile b/examples/obldc/led/Makefile
index 3add5b9..40d30f3 100644
--- a/examples/obldc/led/Makefile
+++ b/examples/obldc/led/Makefile
@@ -17,6 +17,6 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
-BINARY = led
+BINARY = led
include ../../Makefile.include
diff --git a/examples/obldc/led/led.c b/examples/obldc/led/led.c
index 5fe3013..44695f8 100644
--- a/examples/obldc/led/led.c
+++ b/examples/obldc/led/led.c
@@ -31,20 +31,17 @@ void clock_setup(void)
/* Enable GPIOB clock. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
-
}
void gpio_setup(void)
{
/* Set GPIO6 and 7 (in GPIO port A) to 'output push-pull'. */
gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL,
- GPIO6 | GPIO7);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO6 | GPIO7);
/* Set GPIO0 and 1 (in GPIO port B) to 'output push-pull'. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
- GPIO_CNF_OUTPUT_PUSHPULL,
- GPIO0 | GPIO1);
+ GPIO_CNF_OUTPUT_PUSHPULL, GPIO0 | GPIO1);
}
int main(void)
@@ -54,7 +51,7 @@ int main(void)
clock_setup();
gpio_setup();
- /* Blink the LED (PC12) on the board. */
+ /* Blink the LEDs on the board. */
while (1) {
gpio_toggle(GPIOA, GPIO6); /* LED on/off */
for (i = 0; i < 800000; i++); /* Wait (needs -O0 CFLAGS). */
diff --git a/examples/obldc/led/led.ld b/examples/obldc/led/led.ld
index b3bb9a4..c8683d5 100644
--- a/examples/obldc/led/led.ld
+++ b/examples/obldc/led/led.ld
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* Linker script for Olimex STM32-H103 (STM32F103RBT6, 128K flash, 20K RAM). */
+/* Linker script for Open-BLDC (STM32F103CBT6, 128K flash, 20K RAM). */
/* Define memory regions. */
MEMORY