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.
Fork of 02_LAB_serial_protocol by
main.h
- Committer:
- fabeltranm
- Date:
- 2017-10-11
- Revision:
- 10:d2bf51fdc68a
- Child:
- 12:b780833f517e
File content as of revision 10:d2bf51fdc68a:
#ifndef MAIN_H   
#define MAIN_H  
//******************************************************************************
// Desarrollado por ferney beltran fbeltran@ecci.edu.co
//******************************************************************************
//*****************************************************************************
//  COMANDOS
//  |POS_i|POS_0|POS_1|POS_2| POS_3 | POS_4 | POS_5 | 
//  |  <  | #C  |  a  |  b  |   c   |   d   |   >   |
//
// #C       ->  indica el comando
// a,b,c,d  ->  parametros del comando
// <,>      ->  inicio,  y fin de comando 
// Nota: El inicio de comando no se almacena en el buffer
//******************************************************************************
/********************** PARAMETROS  DEFINIR  EL  COMMANDO *********************/
#define BUFF_SIZE 6  //Tamaño del buffer
#define COMM_N 0     // Número de Comando 
#define POS_1 1
#define POS_2 2
#define POS_3 3
#define POS_4 4
/********************** PARAMETROS  COMMANDO LED +++++++++*********************/
// el comando indica  cuados segundo, milisegundo y  debe estar 
// encendido el LED 
//  |POS_i|POS_0|POS_1|POS_2| POS_3 | POS_4 | POS_5 | 
//  |  <  | #C  |  S1 |  S0 |  mS1  |  mS0  |   >   |
//COMANDOS LED
#define COMMAND_LED 0
#define TIME_LED_S1  POS_1 // tiempo del comando en segundo hi
#define TIME_LED_S0  POS_2 // tiempo del comando en segundo lo
#define TIME_LED_mS1 POS_3 // tiempo del comando en mili segundo hi 
#define TIME_LED_mS0 POS_3 // tiempo del comando en mili segundo lo
//COMANDOS DRAW
#define COMMAND_DOT 1
#define DOT_POS_X  POS_1 // Posición de la cordenada X 
#define DOT_POS_Y  POS_2 // posicion de la cordenada Y
// COMANDOS LINE
#define COMMAND_LINE 2
#define LINE_POS_Xi  POS_1 // Posición de la cordenada inicial X 
#define LINE_POS_Yi  POS_2 // posicion de la cordenada inicial Y
#define LINE_POS_Xf  POS_3 // Posición de la cordenada final X 
#define LINE_POS_Yf  POS_4 // posicion de la cordenada final Y
// COMANDOS  RECTANGLE
#define COMMAND_RECTANGLE 3
#define REC_POS_X   POS_1 // Posición de la cordenada inicial X 
#define REC_POS_Y   POS_2 // Posición de la cordenada final X 
#define REC_WIDTH   POS_3 // width
#define REC_HEIGHT  POS_4 // height
// COMANDOS 
#define CICLE_NC 4
#define HOME_NC 5
#endif //  MAIN_H 
            
    