Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-STM32F103C8T6 mbed
Fork of STM32F103C8T6_Hello by
Revision 10:4b88be251088, committed 2016-09-15
- Comitter:
- hudakz
- Date:
- Thu Sep 15 18:40:03 2016 +0000
- Parent:
- 9:d3fb631890d7
- Child:
- 11:f44fc4db4ab1
- Commit message:
- Updated.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Aug 13 11:56:02 2016 +0000
+++ b/main.cpp Thu Sep 15 18:40:03 2016 +0000
@@ -1,17 +1,19 @@
#include "stm32f103c8t6.h"
#include "mbed.h"
-
-Serial pc(PA_2, PA_3);
-DigitalOut myled(LED1);
-
+
int main() {
+ confSysClock(); //Configure system clock (72MHz HSE clock, 48MHz USB clock)
+
+ Serial pc(PA_2, PA_3);
+ DigitalOut myled(LED1);
+
while(1) {
// The on-board LED is connected, via a resistor, to +3.3V (not to GND).
// So to turn the LED on or off we have to set it to 0 or 1 respectively
myled = 0; // turn the LED on
- wait(0.2); // 200 ms
+ wait_ms(200); // 200 millisecond
myled = 1; // turn the LED off
- wait(1.0); // 1 sec
+ wait_ms(1000); // 1000 millisecond
pc.printf("Blink\r\n");
}
}
