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
Diff: main.cpp
- Revision:
- 1:9f2e7f4788f9
- Parent:
- 0:9f7581d1af6f
- Child:
- 2:6567d77a8394
--- a/main.cpp Wed Jun 26 18:54:11 2019 +0000 +++ b/main.cpp Tue Sep 17 23:16:46 2019 +0000 @@ -1,8 +1,9 @@ -/* ########################################################################### +/* ############################################################################# ** Archivo : main.c -** Proyecto : STM32-F103C8_Plantilla -** Procesador : STM32F103C8 -** Herramienta : Mbed +** Proyecto : STM32F103C8_Plantilla +** Procesador : STM32F103C8T6 +** Plataforma : Blue Pill +** Herramienta : Mbed Compiler ** Version : Driver 01.01 ** Compilador : GNU C Compiler ** Fecha/Hora : 14-07-2015, 11:48, # CodeGen: 0 @@ -30,14 +31,11 @@ : Includes :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */ +#include "stm32f103c8t6.h" #include "mbed.h" -#include "stm32f103c8t6.h" -//#include "stm32f10x.h" -#include "PinNames.h" -//#include "SysClockConf.h" //#include "AnalogIn.h" //#include "Led_RGB.h" -//#include "Serial.h" +#include "Serial.h" //#include "stdio.h" /* @@ -49,6 +47,8 @@ #define off 1 // Estado para boton sin presionar #define hold 2 // Estado para boton mantenido #define release 3 // Estado para boton liberado +#define FALSE 0 // Estado FALSO +#define TRUE 1 // Estado VERDADERO #define Ticker_Rate 1000 // Periodo de interrupción (us) /* +------------------------------------------------------------------------------- @@ -58,7 +58,7 @@ //confSysClock(); // Configure system clock (72MHz HSE clock, 48MHz USB clock) Ticker TimerInt; // Inicializa la Interrupción por Timer DigitalOut led_monitor(LED1); // Inicializa el LED Monitor -DigitalOut led_testigo(PA_1); // Inicializa el LED Testigo +DigitalOut led_testigo(PB_1); // Inicializa el LED Testigo Serial terminal(PA_2, PA_3); // Inicializa la Comunicación Serial a la PC PwmOut servo(PA_7); // Inicializa el PWM AnalogIn sensor1 (PB_0); // Inicializa Canal Analógico para sensor 1 @@ -145,6 +145,8 @@ /* END program */ /*+----------------------------------------------------------------------------- +*+ La documentación va aquí!: +*+----------------------------------------------------------------------------- *+ Conexión al Led Testigo: *+ *+ Los leds se pueden conectar a cualquier pin que se declare como DigitalOut. @@ -205,4 +207,6 @@ *+ Welcome to The Beaners Proyect Community! *+----------------------------------------------------------------------------*/ +/* END documentation */ + /* END Mbed */ \ No newline at end of file