Subversion Repositories HomeAutomation

Rev

Rev 2259 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
920 arune 1
/**
2
 * @defgroup infrared IR Protocols Driver Library
3
 * @code #include <drivers/ir/protocols.h> @endcode
4
 *
5
 * @brief  
6
 *
7
 *
8
 * @author  Andreas Fritiofson, Anders Runeson
9
 * @date    2007
10
 */
11
 
12
/**@{*/
13
 
14
 
608 arune 15
#ifndef IR_PROTOCOLS_H_
16
#define IR_PROTOCOLS_H_
17
#include <stdio.h>
18
#include <config.h>
19
 
20
/* Protocol data structure */
21
typedef struct {
22
    uint8_t protocol;
1922 arune 23
    uint64_t data;
1931 arune 24
    uint16_t timeout;       //Set to 0 to indicate burst protocol (only one pulse train is sent)
608 arune 25
    uint8_t repeats;
1837 myhrman 26
    uint16_t modfreq;
617 arune 27
    uint8_t framecnt;
608 arune 28
} Ir_Protocol_Data_t;
29
 
30
/* Which protocols to use. These should perhaps be configuration options
31
 * (config.inc). Only applies to receiver right now */
2120 linlun 32
#ifndef IR_PROTOCOLS_USE_SIRC
33
# define IR_PROTOCOLS_USE_SIRC      1
34
#endif
35
#ifndef IR_PROTOCOLS_USE_RC5
36
# define IR_PROTOCOLS_USE_RC5       1
37
#endif
38
#ifndef IR_PROTOCOLS_USE_SHARP
39
# define IR_PROTOCOLS_USE_SHARP     1
40
#endif
41
#ifndef IR_PROTOCOLS_USE_NEC
42
# define IR_PROTOCOLS_USE_NEC       1
43
#endif
44
#ifndef IR_PROTOCOLS_USE_SAMSUNG
45
# define IR_PROTOCOLS_USE_SAMSUNG   1
46
#endif
47
#ifndef IR_PROTOCOLS_USE_MARANTZ
48
# define IR_PROTOCOLS_USE_MARANTZ   1
49
#endif
50
#ifndef IR_PROTOCOLS_USE_PANASONIC
51
# define IR_PROTOCOLS_USE_PANASONIC 1
52
#endif
53
#ifndef IR_PROTOCOLS_USE_SKY
54
# define IR_PROTOCOLS_USE_SKY       1
55
#endif
2244 linlun 56
#ifndef IR_PROTOCOLS_USE_IROBOT
57
# define IR_PROTOCOLS_USE_IROBOT        1
58
#endif
2120 linlun 59
#ifndef IR_PROTOCOLS_USE_NEXA2
2233 linlun 60
# define IR_PROTOCOLS_USE_NEXA2 1
2120 linlun 61
#endif
62
#ifndef IR_PROTOCOLS_USE_NEXA1
2233 linlun 63
# define IR_PROTOCOLS_USE_NEXA1 1
2120 linlun 64
#endif
2200 arune 65
#ifndef IR_PROTOCOLS_USE_VIKING
66
# define IR_PROTOCOLS_USE_VIKING    1
67
#endif
2297 arune 68
#ifndef IR_PROTOCOLS_USE_VIKING_T3
69
# define IR_PROTOCOLS_USE_VIKING_T3 0
70
#endif
2233 linlun 71
#ifndef IR_PROTOCOLS_USE_VIKING_STEAK
72
# define IR_PROTOCOLS_USE_VIKING_STEAK  1
73
#endif
2239 linlun 74
#ifndef IR_PROTOCOLS_USE_RUBICSON
75
# define IR_PROTOCOLS_USE_RUBICSON  1
76
#endif
2254 linlun 77
#ifndef IR_PROTOCOLS_USE_OREGON
78
# define IR_PROTOCOLS_USE_OREGON    1
79
#endif
608 arune 80
 
2239 linlun 81
 
608 arune 82
/* All these functions take a buffer with pulse times and tries to parse it
83
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
84
 * and IR_NOT_CORRECT_DATA if there was no match. */
85
#if (IR_PROTOCOLS_USE_SIRC)
86
int8_t parseSIRC(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
87
#endif
88
#if (IR_PROTOCOLS_USE_RC5)
89
int8_t parseRC5(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
90
#endif
91
#if (IR_PROTOCOLS_USE_SHARP)
92
int8_t parseSharp(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
93
#endif
94
#if (IR_PROTOCOLS_USE_NEC)
95
int8_t parseNEC(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
96
#endif
97
#if (IR_PROTOCOLS_USE_SAMSUNG)
98
int8_t parseSamsung(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
99
#endif
732 noddan 100
#if (IR_PROTOCOLS_USE_MARANTZ)
101
int8_t parseMarantz(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
102
#endif
1320 arune 103
#if (IR_PROTOCOLS_USE_PANASONIC)
104
int8_t parsePanasonic(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
105
#endif
1562 arune 106
#if (IR_PROTOCOLS_USE_SKY)
107
int8_t parseSky(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
108
#endif
2244 linlun 109
#if (IR_PROTOCOLS_USE_IROBOT)
110
int8_t parseiRobot(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
111
#endif
2199 arune 112
 
2244 linlun 113
 
2199 arune 114
/* RF protocols needs index parameter */
1588 linlun 115
#if (IR_PROTOCOLS_USE_NEXA2)
2199 arune 116
int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
1588 linlun 117
#endif
1904 arune 118
#if (IR_PROTOCOLS_USE_NEXA1)
2199 arune 119
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
1904 arune 120
#endif
2200 arune 121
#if (IR_PROTOCOLS_USE_VIKING)
122
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
123
#endif
2297 arune 124
#if (IR_PROTOCOLS_USE_VIKING_T3)
125
#include <util/crc16.h>
126
int8_t parseVikingT3(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
127
#endif
2233 linlun 128
#if (IR_PROTOCOLS_USE_VIKING_STEAK)
129
int8_t parseVikingSteak(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
130
#endif
2239 linlun 131
#if (IR_PROTOCOLS_USE_RUBICSON)
132
int8_t parseRubicson(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
133
#endif
2254 linlun 134
#if (IR_PROTOCOLS_USE_OREGON)
135
int8_t parseOregon(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
136
#endif
1588 linlun 137
 
608 arune 138
/* Try to parse all above protocols until a match is found. */
2199 arune 139
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
608 arune 140
/* The Hash protocol always succeeds and creates a one-way signature of the
141
 * pulse times buffer that is supposed to be unique and constant for a specific
142
 * IR event. It may be used to send a valid event even if the protocol hasn't
143
 * been implemented or decoded yet. */
144
int8_t parseHash(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
145
 
146
/* These functions expand a Ir_Protocol_Data_t structure into a raw buffer with
147
 * pulse lengths. They return IR_OK on success and IR_NOT_CORRECT_DATA if the
148
 * Ir_Protocol_Data_t structure is for another protocol or contains invalid
149
 * data. */
150
int8_t expandSIRC(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
151
int8_t expandRC5(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
152
int8_t expandSharp(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
153
int8_t expandNEC(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
154
int8_t expandSamsung(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
732 noddan 155
int8_t expandMarantz(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
1320 arune 156
int8_t expandPanasonic(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
1562 arune 157
int8_t expandSky(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
2244 linlun 158
int8_t expandiRobot(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
1886 arune 159
int8_t expandNexa2(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
1904 arune 160
int8_t expandNexa1(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
608 arune 161
/* Pass the Ir_Protocol_Data_t automatically to the correct function. */
162
int8_t expandProtocol(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto);
163
 
164
 
2236 linlun 165
#define IR_OK           1
608 arune 166
#define IR_NO_PROTOCOL      2
167
#define IR_TIME_OVFL        3
2236 linlun 168
#define IR_NO_DATA      4
169
#define IR_NOT_CORRECT_DATA     5
608 arune 170
#define IR_TO_MUCH_DATA     6
171
#define IR_NOT_FINISHED     7
2236 linlun 172
#define IR_SEND_DEBUG       8
608 arune 173
#define IR_BUTTON_DOWN      0x0
174
#define IR_BUTTON_UP        0xf
175
 
993 arune 176
// defined for the module, uses same definitions for pressed and released as other buttons
177
#define IR_BUTTON_RELEASED  0x0
178
#define IR_BUTTON_PRESSED   0x1
179
 
180
 
1837 myhrman 181
#define CYCLES_PER_US       (F_CPU/1000000UL)
182
#define TIMER_PRESC         (8)
608 arune 183
 
1931 arune 184
#ifndef IR_MIN_PULSE_WIDTH
185
#define IR_MIN_PULSE_WIDTH  (0)                                 //us, used in continuous mode
186
#endif
1871 arune 187
#ifndef IR_MIN_STARTPULSE_WIDTH
188
#define IR_MIN_STARTPULSE_WIDTH (0UL)                           //us, not used when set to 0
189
#endif
1823 arune 190
#ifndef IR_MAX_PULSE_WIDTH
1837 myhrman 191
#define IR_MAX_PULSE_WIDTH  (12000UL)                           //us
1823 arune 192
#endif
608 arune 193
 
194
/* RC5 Implementation
195
 * Receiver: DONE
923 arune 196
 * Transmitter: DONE
608 arune 197
 */
1837 myhrman 198
#define IR_RC5_HALF_BIT     (889*CYCLES_PER_US/TIMER_PRESC)     //us
199
#define IR_RC5_BIT          (889*2*CYCLES_PER_US/TIMER_PRESC)   //us
200
#define IR_RC5_TIMEOUT      (117-IR_MAX_PULSE_WIDTH/1000)       //ms    (time between ir frames)
201
#define IR_RC5_REPS         (1)                                 //      (minimum number of times to repeat code)
202
#define IR_RC5_F_MOD        (36)                                //kHz   (modulation frequency)
203
#define IR_RC5_TOL_DIV      (4)
608 arune 204
 
205
/* RC6 Implementation
206
 * Receiver:
207
 * Transmitter:
208
 */
1837 myhrman 209
#define IR_RC6_ST_BIT       (1*CYCLES_PER_US/TIMER_PRESC)       //us
210
#define IR_RC6_TIMEOUT      (50-IR_MAX_PULSE_WIDTH/1000)        //ms    (time between ir frames)
211
#define IR_RC6_REPS         (1)                                 //      (minimum number of times to repeat code)
212
#define IR_RC6_F_MOD        (36)                                //kHz   (modulation frequency)
213
#define IR_RC6_TOL_DIV      (4)
608 arune 214
 
215
/* RCMM Implementation
216
 * Receiver:
217
 * Transmitter:
218
 */
1837 myhrman 219
#define IR_RCMM_ST_BIT      (256*CYCLES_PER_US/TIMER_PRESC)     //us
220
#define IR_RCMM_TIMEOUT     (170-IR_MAX_PULSE_WIDTH/1000)       //ms    (time between ir frames)
221
#define IR_RCMM_REPS        (1)                                 //      (minimum number of times to repeat code)
222
#define IR_RCMM_F_MOD       (36)                                //kHz   (modulation frequency)
223
#define IR_RCMM_TOL_DIV     (4)
608 arune 224
 
225
/* SIRC Implementation
226
 * Receiver: DONE
1716 arune 227
 * Transmitter: DONE
608 arune 228
 */
1837 myhrman 229
#define IR_SIRC_ST_BIT      (2400*CYCLES_PER_US/TIMER_PRESC)    //us
230
#define IR_SIRC_LOW         (600*CYCLES_PER_US/TIMER_PRESC)     //us
231
#define IR_SIRC_HIGH_ONE    (1200*CYCLES_PER_US/TIMER_PRESC)    //us
232
#define IR_SIRC_HIGH_ZERO   (600*CYCLES_PER_US/TIMER_PRESC)     //us
1820 arune 233
#define IR_SIRC_TIMEOUT     (52-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
1837 myhrman 234
#define IR_SIRC_REPS        (3)                                 //      (minimum number of times to repeat code)
235
#define IR_SIRC_F_MOD       (40)                                //kHz   (modulation frequency)
236
#define IR_SIRC_TOL_DIV     (4)
608 arune 237
 
238
/* Sharp Implementation
239
 * Receiver: DONE
240
 * Transmitter:
241
 */
1837 myhrman 242
#define IR_SHARP_HIGH       (280*CYCLES_PER_US/TIMER_PRESC)     //us
243
#define IR_SHARP_LOW_ONE    (1850*CYCLES_PER_US/TIMER_PRESC)    //us
244
#define IR_SHARP_LOW_ZERO   (780*CYCLES_PER_US/TIMER_PRESC)     //us
245
#define IR_SHARP_TIMEOUT    (67-IR_MAX_PULSE_WIDTH/1000)        //ms    (time between ir frames)
246
#define IR_SHARP_REPS       (2)                                 //      (minimum number of times to repeat code)
247
#define IR_SHARP_F_MOD      (38)                                //kHz   (modulation frequency)
248
#define IR_SHARP_TOL_DIV    (4)
608 arune 249
 
250
/* NEC Implementation
251
 * Receiver: DONE
252
 * Transmitter: DONE
253
 */
1837 myhrman 254
#define IR_NEC_ST_BIT       (9000*CYCLES_PER_US/TIMER_PRESC)    //us
255
#define IR_NEC_ST_PAUSE     (4500*CYCLES_PER_US/TIMER_PRESC)    //us
256
#define IR_NEC_LOW_ONE      (1690*CYCLES_PER_US/TIMER_PRESC)    //us
257
#define IR_NEC_LOW_ZERO     (560*CYCLES_PER_US/TIMER_PRESC)     //us
258
#define IR_NEC_HIGH         (560*CYCLES_PER_US/TIMER_PRESC)     //us
259
#define IR_NEC_TIMEOUT      (122-IR_MAX_PULSE_WIDTH/1000)       //ms    (time between ir frames)
260
#define IR_NEC_ST_TIMEOUT   (65)                                //ms    (time between first ir frames and second)
261
#define IR_NEC_REPS         (1)                                 //      (minimum number of times to repeat code)
262
#define IR_NEC_F_MOD        (38)                                //kHz   (modulation frequency)
263
#define IR_NEC_TOL_DIV      (4)
608 arune 264
 
265
/* Samsung Implementation
266
 * Receiver: DONE
267
 * Transmitter: DONE
268
 */
1837 myhrman 269
#define IR_SAMS_ST_BIT      (4500*CYCLES_PER_US/TIMER_PRESC)    //us
270
#define IR_SAMS_ST_PAUSE    (4500*CYCLES_PER_US/TIMER_PRESC)    //us
271
#define IR_SAMS_LOW_ONE     (1720*CYCLES_PER_US/TIMER_PRESC)    //us
272
#define IR_SAMS_LOW_ZERO    (650*CYCLES_PER_US/TIMER_PRESC)     //us
273
#define IR_SAMS_HIGH        (500*CYCLES_PER_US/TIMER_PRESC)     //us
274
#define IR_SAMS_TIMEOUT     (62-IR_MAX_PULSE_WIDTH/1000)        //ms    (time between ir frames)
275
#define IR_SAMS_REPS        (1)                                 //      (minimum number of times to repeat code)
276
#define IR_SAMS_F_MOD       (38)                                //kHz   (modulation frequency)
277
#define IR_SAMS_TOL_DIV     (4)
608 arune 278
 
732 noddan 279
/* Marantz Implementation
920 arune 280
 * Receiver: DONE (has not been tested with odd adressbits)
1716 arune 281
 * Transmitter: DONE
732 noddan 282
 */
1837 myhrman 283
#define IR_MARANTZ_HALF_BIT     (889*CYCLES_PER_US/TIMER_PRESC)     //us
284
#define IR_MARANTZ_BIT          (889*2*CYCLES_PER_US/TIMER_PRESC)   //us
285
#define IR_MARANTZ_TIMEOUT      (117-IR_MAX_PULSE_WIDTH/1000)       //ms    (time between ir frames)
286
#define IR_MARANTZ_REPS         (1)                                 //      (minimum number of times to repeat code)
287
#define IR_MARANTZ_F_MOD        (36)                                //kHz   (modulation frequency)
288
#define IR_MARANTZ_TOL_DIV      (4)
732 noddan 289
 
1320 arune 290
/* Panasonic Implementation
291
 * Receiver: DONE
1324 arune 292
 * Transmitter: DONE
1320 arune 293
 */
1837 myhrman 294
#define IR_PANA_ST_BIT      (3570*CYCLES_PER_US/TIMER_PRESC)    //us
295
#define IR_PANA_ST_PAUSE    (1630*CYCLES_PER_US/TIMER_PRESC)    //us
296
#define IR_PANA_LOW_ONE     (1240*CYCLES_PER_US/TIMER_PRESC)    //us
297
#define IR_PANA_LOW_ZERO    (400*CYCLES_PER_US/TIMER_PRESC)     //us
298
#define IR_PANA_HIGH        (495*CYCLES_PER_US/TIMER_PRESC)     //us
299
#define IR_PANA_TIMEOUT     (92-IR_MAX_PULSE_WIDTH/1000)        //ms    (time between ir frames)
300
#define IR_PANA_REPS        (1)                                 //      (minimum number of times to repeat code)
301
#define IR_PANA_F_MOD       (38)                                //kHz   (modulation frequency)
302
#define IR_PANA_TOL_DIV     (4)
1320 arune 303
 
1562 arune 304
/* Sky Implementation
305
 * Receiver: DONE
306
 * Transmitter:
307
 */
1837 myhrman 308
#define IR_SKY_ST_BIT       (2800*CYCLES_PER_US/TIMER_PRESC)    //us
309
#define IR_SKY_SHORT        (460*CYCLES_PER_US/TIMER_PRESC)     //us
310
#define IR_SKY_LONG         (920*CYCLES_PER_US/TIMER_PRESC)     //us
311
#define IR_SKY_TIMEOUT      (162-IR_MAX_PULSE_WIDTH/1000)       //ms    (time between ir frames)
312
#define IR_SKY_REPS         (1)                                 //      (minimum number of times to repeat code)
313
#define IR_SKY_F_MOD        (38)                                //kHz   (modulation frequency)
314
#define IR_SKY_TOL_DIV      (4)
1320 arune 315
 
2244 linlun 316
/* iRobot Implementation
317
 * Receiver: -
318
 * Transmitter: DONE
319
 */
320
#define IR_IROBOT_ST_BIT        (2800*CYCLES_PER_US/TIMER_PRESC)        //us
321
#define IR_IROBOT_SHORT     (1000*CYCLES_PER_US/TIMER_PRESC)        //us
322
#define IR_IROBOT_LONG      (3000*CYCLES_PER_US/TIMER_PRESC)        //us
2246 linlun 323
#define IR_IROBOT_TIMEOUT       30      //ms    (time between ir frames)
324
#define IR_IROBOT_REPS      (6)                                 //      (minimum number of times to repeat code)
2244 linlun 325
#define IR_IROBOT_F_MOD     (40)                                //kHz   (modulation frequency)
326
#define IR_IROBOT_TOL_DIV       (4)
1562 arune 327
 
2244 linlun 328
 
1588 linlun 329
/* Nexa2 Implementation
1929 arune 330
 * Receiver: DONE
331
 * Transmitter: DONE
1588 linlun 332
 */
1874 arune 333
#define IR_NEXA2_START1     (10000*CYCLES_PER_US/TIMER_PRESC)   //us
334
#define IR_NEXA2_START2     (2500*CYCLES_PER_US/TIMER_PRESC)    //us
1837 myhrman 335
#define IR_NEXA2_HIGH       (320*CYCLES_PER_US/TIMER_PRESC)     //us
336
#define IR_NEXA2_LOW_ONE    (210*CYCLES_PER_US/TIMER_PRESC)     //us
337
#define IR_NEXA2_LOW_ZERO   (1200*CYCLES_PER_US/TIMER_PRESC)    //us
1922 arune 338
#define IR_NEXA2_TIMEOUT    (200)                               //ms    (time between ir frames)
1874 arune 339
#define IR_NEXA2_REPS       (5)                                 //      (minimum number of times to repeat code)
1837 myhrman 340
#define IR_NEXA2_F_MOD      (38)                                //kHz   (modulation frequency)
1874 arune 341
#define IR_NEXA2_TOL_DIV    (2)
1562 arune 342
 
1588 linlun 343
 
1904 arune 344
/* Nexa1 Implementation
1929 arune 345
 * Receiver: DONE
1904 arune 346
 * Transmitter:
347
 */
1906 arune 348
#define IR_NEXA1_START      (10000*CYCLES_PER_US/TIMER_PRESC)   //us
349
#define IR_NEXA1_SHORT      (370*CYCLES_PER_US/TIMER_PRESC)     //us
350
#define IR_NEXA1_LONG       (1050*CYCLES_PER_US/TIMER_PRESC)    //us
1922 arune 351
#define IR_NEXA1_TIMEOUT    (200)                               //ms    (time between ir frames)
1906 arune 352
#define IR_NEXA1_REPS       (4)                                 //      (minimum number of times to repeat code)
1904 arune 353
#define IR_NEXA1_F_MOD      (38)                                //kHz   (modulation frequency)
354
#define IR_NEXA1_TOL_DIV    (2)
355
 
356
 
1931 arune 357
/* Viking Temperature sensor Implementation
358
 * Receiver:
359
 */
360
#define IR_VIKING_LOW       (940*CYCLES_PER_US/TIMER_PRESC)     //us
361
#define IR_VIKING_HIGH_ONE  (1483*CYCLES_PER_US/TIMER_PRESC)        //us
362
#define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us
363
#define IR_VIKING_TIMEOUT   (0)                                 //ms BURST! (time between ir frames)
364
#define IR_VIKING_REPS      (1)                                 //      (minimum number of times to repeat code)
365
#define IR_VIKING_F_MOD     (38)                                //kHz   (modulation frequency)
2200 arune 366
#define IR_VIKING_TOL_DIV   (3)
1931 arune 367
 
2233 linlun 368
/* Viking Steak temperature sensor Implementation
369
 * Receiver:
370
 */
371
#define IR_VIKING_STEAK_HIGH        (700*CYCLES_PER_US/TIMER_PRESC)     //us
372
#define IR_VIKING_STEAK_LOW_ONE (4000*CYCLES_PER_US/TIMER_PRESC)        //us
373
#define IR_VIKING_STEAK_LOW_ZERO    (1700*CYCLES_PER_US/TIMER_PRESC)    //us
374
#define IR_VIKING_STEAK_LOW_START   (7800*CYCLES_PER_US/TIMER_PRESC)        //us
2237 linlun 375
#define IR_VIKING_STEAK_TIMEOUT (200)                                   //ms BURST! (time between ir frames)
2233 linlun 376
#define IR_VIKING_STEAK_REPS        (1)                                 //      (minimum number of times to repeat code)
377
#define IR_VIKING_STEAK_F_MOD       (38)                                //kHz   (modulation frequency)
2236 linlun 378
#define IR_VIKING_STEAK_TOL_DIV (4)
1931 arune 379
 
2239 linlun 380
/* Rubicson temperature sensor Implementation
381
 * Receiver:
382
 */
383
#define IR_RUBICSON_HIGH        (550*CYCLES_PER_US/TIMER_PRESC)     //us
384
#define IR_RUBICSON_LOW_ONE     (1880*CYCLES_PER_US/TIMER_PRESC)        //us
385
#define IR_RUBICSON_LOW_ZERO        (900*CYCLES_PER_US/TIMER_PRESC) //us
386
#define IR_RUBICSON_LOW_START       (3850*CYCLES_PER_US/TIMER_PRESC)        //us
387
#define IR_RUBICSON_TIMEOUT     (200)                                   //ms BURST! (time between ir frames)
388
#define IR_RUBICSON_REPS        (1)                                 //      (minimum number of times to repeat code)
389
#define IR_RUBICSON_F_MOD       (38)                                //kHz   (modulation frequency)
390
#define IR_RUBICSON_TOL_DIV     (4)
391
 
2254 linlun 392
/* Oregon weather sensor Implementation
393
 * Receiver:
394
 */
2259 linlun 395
#define IR_OREGON_SHORT_S       (250*CYCLES_PER_US/TIMER_PRESC)     //us
396
#define IR_OREGON_SHORT_L       (700*CYCLES_PER_US/TIMER_PRESC)     //us
397
#define IR_OREGON_LONG_S        (750*CYCLES_PER_US/TIMER_PRESC)     //us
398
#define IR_OREGON_LONG_L        (1250*CYCLES_PER_US/TIMER_PRESC)    //us
399
#define IR_OREGON_END           (2000*CYCLES_PER_US/TIMER_PRESC)    //us
2254 linlun 400
#define IR_OREGON_DATASIZE      25
401
#define IR_OREGON_TIMEOUT       (200)                               //ms BURST! (time between ir frames)
402
#define IR_OREGON_REPS          (1)                                 //      (minimum number of times to repeat code)
403
#define IR_OREGON_F_MOD         (38)                                //kHz   (modulation frequency)
404
 
405
 
920 arune 406
#define IR_PROTO_HASH       0xfe
407
#define IR_PROTO_UNKNOWN    0xff                                //
732 noddan 408
 
920 arune 409
 
410
 
411
/**@}*/
608 arune 412
#endif /*IR_PROTOCOLS_H_*/