Programa base para la tarjeta STM32-MINIMO, usando la libreria mbed-dev.

Dependencies:   mbed-dev

Fork of STM32F103C8T6_Hello by Zoltan Hudak

Committer:
Siconetics
Date:
Mon Dec 19 15:26:09 2016 +0000
Revision:
11:7ad02c61c1f9
Parent:
10:4b88be251088
STM32-MINIMO_MBED_Hello

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Siconetics 11:7ad02c61c1f9 1
hudakz 0:ab218237069e 2 #include "mbed.h"
Siconetics 11:7ad02c61c1f9 3
Siconetics 11:7ad02c61c1f9 4 Serial pc(PA_9, PA_10);
Siconetics 11:7ad02c61c1f9 5 DigitalOut myled(PC_13);
Siconetics 11:7ad02c61c1f9 6
Siconetics 11:7ad02c61c1f9 7 int main()
Siconetics 11:7ad02c61c1f9 8 {
Siconetics 11:7ad02c61c1f9 9 ProgMain:
Siconetics 11:7ad02c61c1f9 10 // The on-board LED is connected, via a resistor, to +3.3V (not to GND).
Siconetics 11:7ad02c61c1f9 11 // So to turn the LED on or off we have to set it to 0 or 1 respectively
Siconetics 11:7ad02c61c1f9 12 myled = false; // turn the LED on
Siconetics 11:7ad02c61c1f9 13 wait_ms(100); // 100 millisecond
Siconetics 11:7ad02c61c1f9 14 myled = true; // turn the LED off
Siconetics 11:7ad02c61c1f9 15 wait_ms(100); // 100 millisecond
Siconetics 11:7ad02c61c1f9 16 pc.printf("Blink\r\n");
Siconetics 11:7ad02c61c1f9 17 goto ProgMain;
Siconetics 11:7ad02c61c1f9 18
hudakz 0:ab218237069e 19 }