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.
Revision 8:9cb2877285b2, committed 2022-08-25
- Comitter:
- Antulius
- Date:
- Thu Aug 25 01:36:53 2022 +0000
- Parent:
- 7:62b714b5d89d
- Commit message:
- Plantilla Mejorada y estructurada para la Tarjeta Bluepill
Changed in this revision
| BluePill/SysClockConf.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BluePill/SysClockConf.h Tue Feb 22 04:28:18 2022 +0000 +++ b/BluePill/SysClockConf.h Thu Aug 25 01:36:53 2022 +0000 @@ -1,22 +1,2 @@ -/* - ****************************************************************************** - * @file SysClockConf.h - * @version - * @date 05-July-2016 - * @brief System Clock configuration for STM32F103C8T6 - ***************************************************************************** - * - * All rights reserved. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. -*/ -#ifndef CONFSYSCLOCK_H -#define CONFSYSCLOCK_H - #pragma once void confSysClock(void); - -#endif \ No newline at end of file
--- a/main.cpp Tue Feb 22 04:28:18 2022 +0000
+++ b/main.cpp Thu Aug 25 01:36:53 2022 +0000
@@ -45,17 +45,22 @@
: D E F I N I C I O N E S
:...............................................................................
*/
-#define LED_ON 0 // Estado para el Led Encendido
-#define LED_OFF 1 // Estado para el Led Apagado
-#define BUZZ_ON 1 // Estado para Buzzer Encendido
-#define BUZZ_OFF 0 // Estado para Buzzer Apagado
-#define ON 0 // Estado para boton presionado
-#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)
+#define HIGH 1 // Estado ALTO
+#define LOW 0 // Estado BAJO
+#define ON 0 // Estado para ENCENDIDO
+#define OFF 1 // Estado para APAGADO
+#define BUZZ_ON 0 // Estado para Buzzer Encendido
+#define BUZZ_OFF 1 // Estado para Buzzer Apagado
+#define KEY_ON 0 // Estado para boton presionado
+#define KEY_OFF 1 // Estado para boton sin presionar
+#define KEY_HOLD 2 // Estado para boton mantenido
+#define KEY_RELEASE 3 // Estado para boton liberado
+#define KEY_REPEAT 4 // Estado para boton Repetido
+#define LED_ON 1 // Estado para Led Encendido
+#define LED_OFF 0 // Estado para Led Apagado
+#define TICKER_RATE 1000 // Periodo de interrupción Ticker (us)
#define BAUD_RATE 115200 // Velocidad de Transmisión (Bauds)
// Velocidades Permitidas:
// 300, 600, 1200, 2400, 4800, 9600,
@@ -72,7 +77,7 @@
PwmOut Pwm1(PA_7); // Inicializa el PWM para el LED Externo
PwmOut Buzzer(PB_0); // Inicializa el PWM para el Buzzer Externo
AnalogIn Sensor1(PA_1); // Inicializa Canal Analógico para Potenciometro 1
-Serial Terminal(PA_2, PA_3); // Inicializa la Comunicación Serial a la PC (Rx, Tx)
+Serial Terminal(PA_2, PA_3); // Inicializa la Comunicación Serial a la PC (Tx, Rx)
/*
+-------------------------------------------------------------------------------
| V A R I A B L E S G L O B A L E S |
@@ -108,11 +113,11 @@
*/
int main() // El código secuencial comienza aquí
{
-//+++++++++++++++++++ Secuencia Principal +++++++++++++++++++++++++++++++++++++
+//=================== Secuencia Principal =====================================
// Inicialización de variables, puertos, interrupciones y carátula
Setup(); // Inicialización de puertos, interrupciones y condiciones iniciales
Clear_Screen(); // Limpia la pantalla de la Terminal
-//+++++++++++++++++++ Lazo Principal +++++++++++++++++++++++++++++++++++++++++++
+//=================== Lazo Principal ===========================================
// El Lazo del Programa principal está aquí !!!
while (true)
{
@@ -272,6 +277,7 @@
*+ prefijo signifcado uso
*+ v_ variable (var) v_nombre_variable
*+ c_ constante (const) c_nombre_constante
+*+ a_ arreglo (array) a_nombre_arreglo
*+ i_ indice (index) i_nombre_indice
*+ p_ apuntador (pointer) p_nombre_apuntador
*+ l_ etiqueta (label) l_nombre_etiqueta
@@ -402,7 +408,7 @@
*+ T H E A N T U L I U ' S T E A M R&D Unltd
*+
*+ Research, Development, Systems, Equipment, Support & Spare Parts.
-*+ (C) Copyright 1989-2019, All Rights Reserved
+*+ (C) Copyright 1989-2022, All Rights Reserved
*+
*+ Welcome to The Beaners Proyect Community!
*+----------------------------------------------------------------------------*/