Subversion Repositories HomeAutomation

Rev

Rev 2200 | Rev 2236 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 2200 Rev 2233
Line 59... Line 59...
59
#ifndef IR_PROTOCOLS_USE_NEXA1
59
#ifndef IR_PROTOCOLS_USE_NEXA1
60
# define IR_PROTOCOLS_USE_NEXA1     1
60
# define IR_PROTOCOLS_USE_NEXA1 1
61
#endif
61
#endif
62
#ifndef IR_PROTOCOLS_USE_VIKING
62
#ifndef IR_PROTOCOLS_USE_VIKING
63
# define IR_PROTOCOLS_USE_VIKING    1
63
# define IR_PROTOCOLS_USE_VIKING    1
-
 
64
#endif
-
 
65
#ifndef IR_PROTOCOLS_USE_VIKING_STEAK
-
 
66
# define IR_PROTOCOLS_USE_VIKING_STEAK  1
64
#endif
67
#endif
65
 
68
 
66
/* All these functions take a buffer with pulse times and tries to parse it
69
/* All these functions take a buffer with pulse times and tries to parse it
67
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
70
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
68
 * and IR_NOT_CORRECT_DATA if there was no match. */
71
 * and IR_NOT_CORRECT_DATA if there was no match. */
Line 98... Line 101...
98
#if (IR_PROTOCOLS_USE_NEXA1)
101
#if (IR_PROTOCOLS_USE_NEXA1)
99
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
102
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
100
#endif
103
#endif
101
#if (IR_PROTOCOLS_USE_VIKING)
104
#if (IR_PROTOCOLS_USE_VIKING)
102
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
105
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
-
 
106
#endif
-
 
107
#if (IR_PROTOCOLS_USE_VIKING_STEAK)
-
 
108
int8_t parseVikingSteak(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
103
#endif
109
#endif
104
 
110
 
105
/* Try to parse all above protocols until a match is found. */
111
/* Try to parse all above protocols until a match is found. */
106
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
112
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
107
/* The Hash protocol always succeeds and creates a one-way signature of the
113
/* The Hash protocol always succeeds and creates a one-way signature of the
Line 260... Line 266...
260
#define IR_MARANTZ_REPS         (1)                                 //      (minimum number of times to repeat code)
266
#define IR_MARANTZ_REPS         (1)                                 //      (minimum number of times to repeat code)
261
#define IR_MARANTZ_F_MOD        (36)                                //kHz   (modulation frequency)
267
#define IR_MARANTZ_F_MOD        (36)                                //kHz   (modulation frequency)
262
#define IR_MARANTZ_TOL_DIV      (4)
268
#define IR_MARANTZ_TOL_DIV      (4)
263
 
269
 
264
/* Panasonic Implementation
270
/* Panasonic Implementation
265
 * Receiver: DONE
271
 * Receiver: DONE
266
 * Transmitter: DONE
272
 * Transmitter: DONE
267
 */
273
 */
268
#define IR_PROTO_PANASONIC  (8)
274
#define IR_PROTO_PANASONIC  (8)
269
#define IR_PANA_ST_BIT      (3570*CYCLES_PER_US/TIMER_PRESC)    //us
275
#define IR_PANA_ST_BIT      (3570*CYCLES_PER_US/TIMER_PRESC)    //us
270
#define IR_PANA_ST_PAUSE    (1630*CYCLES_PER_US/TIMER_PRESC)    //us
276
#define IR_PANA_ST_PAUSE    (1630*CYCLES_PER_US/TIMER_PRESC)    //us
271
#define IR_PANA_LOW_ONE     (1240*CYCLES_PER_US/TIMER_PRESC)    //us
277
#define IR_PANA_LOW_ONE     (1240*CYCLES_PER_US/TIMER_PRESC)    //us
272
#define IR_PANA_LOW_ZERO    (400*CYCLES_PER_US/TIMER_PRESC)     //us
278
#define IR_PANA_LOW_ZERO    (400*CYCLES_PER_US/TIMER_PRESC)     //us
Line 330... Line 336...
330
#define IR_VIKING_TIMEOUT   (0)                                 //ms BURST! (time between ir frames)
336
#define IR_VIKING_TIMEOUT   (0)                                 //ms BURST! (time between ir frames)
331
#define IR_VIKING_REPS      (1)                                 //      (minimum number of times to repeat code)
337
#define IR_VIKING_REPS      (1)                                 //      (minimum number of times to repeat code)
332
#define IR_VIKING_F_MOD     (38)                                //kHz   (modulation frequency)
338
#define IR_VIKING_F_MOD     (38)                                //kHz   (modulation frequency)
333
#define IR_VIKING_TOL_DIV   (3)
339
#define IR_VIKING_TOL_DIV   (3)
334
 
340
 
-
 
341
/* Viking Steak temperature sensor Implementation
-
 
342
 * Receiver:
-
 
343
 */
-
 
344
#define IR_PROTO_VIKING_STEAK       (13)
-
 
345
#define IR_VIKING_STEAK_HIGH        (700*CYCLES_PER_US/TIMER_PRESC)     //us
-
 
346
#define IR_VIKING_STEAK_LOW_ONE (4000*CYCLES_PER_US/TIMER_PRESC)        //us
-
 
347
#define IR_VIKING_STEAK_LOW_ZERO    (1700*CYCLES_PER_US/TIMER_PRESC)    //us
-
 
348
#define IR_VIKING_STEAK_LOW_START   (7800*CYCLES_PER_US/TIMER_PRESC)        //us
-
 
349
#define IR_VIKING_STEAK_TIMEOUT (0)                                 //ms BURST! (time between ir frames)
-
 
350
#define IR_VIKING_STEAK_REPS        (1)                                 //      (minimum number of times to repeat code)
-
 
351
#define IR_VIKING_STEAK_F_MOD       (38)                                //kHz   (modulation frequency)
-
 
352
#define IR_VIKING_STEAK_TOL_DIV (2)
335
 
353
 
336
#define IR_PROTO_HASH       0xfe
354
#define IR_PROTO_HASH       0xfe
337
#define IR_PROTO_UNKNOWN    0xff                                //
355
#define IR_PROTO_UNKNOWN    0xff                                //
338
 
356
 
339
 
357