Subversion Repositories HomeAutomation

Rev

Rev 122 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 122 Rev 125
Line 2... Line 2...
2
 *
2
 *
3
 *                  Main application
3
 *                  Main application
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canIR/Source/Main.c $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canIR/Source/Main.c $
7
 * Last changed:    $LastChangedDate: 2006-11-18 21:08:42 +0100 (Sat, 18 Nov 2006) $
7
 * Last changed:    $LastChangedDate: 2006-11-19 15:59:01 +0100 (Sun, 19 Nov 2006) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 122 $
9
 * Revision:        $Revision: 125 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
 
12
 
13
#include <compiler.h>
13
#include <compiler.h>
14
#include <stackTasks.h>
14
#include <stackTasks.h>
Line 205... Line 205...
205
*/
205
*/
206
#ifdef USE_IREC
206
#ifdef USE_IREC
207
void irecParse(IR_TYPE type, BYTE toggle, BYTE addr, BYTE data)
207
void irecParse(IR_TYPE type, BYTE toggle, BYTE addr, BYTE data)
208
{
208
{
209
    CAN_MESSAGE outCm;
209
    CAN_MESSAGE outCm;
210
    outCm.funct         = 0x01;
210
    outCm.funct         = FUNCT_SENSORS;
211
    outCm.funcc         = 0x01;
211
    outCm.funcc         = FUNCC_SENSORS_IR;
212
    outCm.nid           = MY_NID;
212
    outCm.nid           = MY_NID;
213
    outCm.sid           = MY_ID;
213
    outCm.sid           = MY_ID;
214
    outCm.data_length   = 4;
214
    outCm.data_length   = 4;
215
    outCm.data[3]       = type;
215
    outCm.data[3]       = type;
216
    outCm.data[2]       = toggle;
216
    outCm.data[2]       = toggle;