Programa base para la tarjeta STM32-MINIMO, usando la libreria mbed-dev.
Fork of STM32F103C8T6_Hello by
Revision 5:3c3ef17a17a6, committed 2016-07-05
- Comitter:
- hudakz
- Date:
- Tue Jul 05 18:21:02 2016 +0000
- Parent:
- 4:a81f44fc487e
- Child:
- 6:d99931fc19c0
- Commit message:
- Udpated
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-STM32F103C8T6.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Jul 02 08:25:56 2016 +0000 +++ b/main.cpp Tue Jul 05 18:21:02 2016 +0000 @@ -1,15 +1,18 @@ -#include "PinNames.h" // Pin name definitions for the STM32F103C8T6 board +#include "stm32f103c8t6.h" #include "mbed.h" -DigitalOut myled(LED1); +Serial pc(USBTX, USBRX); +DigitalOut myled(LED1); int main() { + configSysClock(); // selecting 72MHz High-speed External clock and 32MHz APB1 peripheral clock while(1) { - // The on-board LED is connected, via a resistor, to +3.3V (instead of GND). + // 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 myled = 1; // turn the LED off wait(1.0); // 1 sec + pc.printf("Blink\r\n"); } }
--- a/mbed-STM32F103C8T6.lib Sat Jul 02 08:25:56 2016 +0000 +++ b/mbed-STM32F103C8T6.lib Tue Jul 05 18:21:02 2016 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#1d18653e7c94 +http://mbed.org/users/hudakz/code/mbed-STM32F103C8T6/#534793444c60