comunicacion.h 1.75 KB
Newer Older
1 2 3 4 5 6 7 8
/*
 * Proyecto Domotica | Nodo Central
 * comunicacion.h
 * Contiene los comandos que son interpretables por todos los nodos
 * de la red. Tambien las frecuencias predefinidas para cada tipo
 * de nodo.
 */
/*******************************************************************************
9 10 11
 * Copyright (c) 2015
 * Martin Enriquez (martin.hernan.enriquez@gmail.com), 
 * Leandro Lanzieri Rodriguez (lanzierileandro@gmail.com).
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
 *
 * This file is part of Proyecto Domotica.
 *
 *     Proyecto Domotica 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.
 *
 *     Proyecto Domotica is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with Proyecto Domotica.  If not, see <http://www.gnu.org/licenses/>.
 *******************************************************************************/


#ifndef COMUNICACION_H_
#define COMUNICACION_H_

/* ======== COMANDOS ========= */
#define RELE_ON		0x0F
#define	RELE_OFF	0x01
#define	RELE_TOGGLE	0xDA
#define ENTRO_PANTALLA	0x07

#define	LUCES_ON	0x1F
#define	LUCES_OFF	0x11
#define	LUCES_TOGGLE 0x1A
#define LUCES_DUTY	0x1D
#define LUCES_AUMENTAR 0x1B
#define	LUCES_DISMINUIR 0x1C

46
#define PING 0x19
47
#define ACK 0x41
48
/* ======= FRECUENCIAS ======== */
49 50 51
/* El MSB debe ser 0*/
#define FREC_LUCES	0x66 // 0110 0110
#define	FREC_ON_OFF	0x78 // 0111 1000
52 53

#endif /* COMUNICACION_H_ */