mbed-classic on Bluepill
Dependencies: mbed-STM32F103C8T6 mbed
Fork of Testato-mbed-dev-Bluepill by
main.cpp@15:db1bed031739, 2016-09-17 (annotated)
- Committer:
- testato
- Date:
- Sat Sep 17 11:03:13 2016 +0000
- Revision:
- 15:db1bed031739
- Parent:
- 13:2bfcb5dc142a
- Child:
- 16:2231520f7869
wait function
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 5:3c3ef17a17a6 | 1 | #include "stm32f103c8t6.h" |
hudakz | 0:ab218237069e | 2 | #include "mbed.h" |
hudakz | 8:f1432e9af6c8 | 3 | |
testato | 13:2bfcb5dc142a | 4 | |
testato | 10:69c66b10784c | 5 | //Serial pc(PA_2, PA_3); |
testato | 12:3ddf4333812e | 6 | DigitalOut myled(PC_13); |
hudakz | 8:f1432e9af6c8 | 7 | |
testato | 13:2bfcb5dc142a | 8 | |
testato | 13:2bfcb5dc142a | 9 | |
testato | 13:2bfcb5dc142a | 10 | |
testato | 11:2cc880f72fc1 | 11 | int main() |
testato | 11:2cc880f72fc1 | 12 | { |
testato | 12:3ddf4333812e | 13 | confSysClock(); //Configure system clock (72MHz HSE clock, 48MHz USB clock) |
testato | 11:2cc880f72fc1 | 14 | |
testato | 11:2cc880f72fc1 | 15 | while(1) |
testato | 11:2cc880f72fc1 | 16 | { |
hudakz | 5:3c3ef17a17a6 | 17 | // The on-board LED is connected, via a resistor, to +3.3V (not to GND). |
hudakz | 3:c6a589f444b9 | 18 | // So to turn the LED on or off we have to set it to 0 or 1 respectively |
testato | 15:db1bed031739 | 19 | myled = 0; |
testato | 15:db1bed031739 | 20 | wait(0.1); |
testato | 15:db1bed031739 | 21 | myled = 1; |
testato | 15:db1bed031739 | 22 | wait(0.1); |
testato | 15:db1bed031739 | 23 | |
testato | 10:69c66b10784c | 24 | //pc.printf("Blink\r\n"); |
hudakz | 0:ab218237069e | 25 | } |
hudakz | 0:ab218237069e | 26 | } |
hudakz | 8:f1432e9af6c8 | 27 |