mbed-classic on Bluepill

Dependencies:   mbed-STM32F103C8T6 mbed

Fork of Testato-mbed-dev-Bluepill by Testato Testato

Committer:
testato
Date:
Sat Sep 10 21:00:17 2016 +0000
Revision:
11:2cc880f72fc1
Parent:
10:69c66b10784c
Child:
12:3ddf4333812e
timing problem

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hudakz 5:3c3ef17a17a6 1 #include "stm32f103c8t6.h"
hudakz 0:ab218237069e 2 #include "mbed.h"
hudakz 8:f1432e9af6c8 3
testato 10:69c66b10784c 4 //Serial pc(PA_2, PA_3);
hudakz 5:3c3ef17a17a6 5 DigitalOut myled(LED1);
hudakz 8:f1432e9af6c8 6
testato 11:2cc880f72fc1 7 int main()
testato 11:2cc880f72fc1 8 {
testato 11:2cc880f72fc1 9 confSysClock(); //Configure system clock (72MHz HSE clock, 48MHz USB clock)
testato 11:2cc880f72fc1 10
testato 11:2cc880f72fc1 11 while(1)
testato 11:2cc880f72fc1 12 {
hudakz 5:3c3ef17a17a6 13 // The on-board LED is connected, via a resistor, to +3.3V (not to GND).
hudakz 3:c6a589f444b9 14 // So to turn the LED on or off we have to set it to 0 or 1 respectively
hudakz 7:accb2c83a007 15 myled = 0; // turn the LED on
testato 10:69c66b10784c 16 wait_ms(100); // 200 ms
hudakz 7:accb2c83a007 17 myled = 1; // turn the LED off
testato 10:69c66b10784c 18 wait_ms(100); // 1 sec
testato 10:69c66b10784c 19 //pc.printf("Blink\r\n");
hudakz 0:ab218237069e 20 }
hudakz 0:ab218237069e 21 }
hudakz 8:f1432e9af6c8 22