Subversion Repositories HomeAutomation

Rev

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

Rev 2237 Rev 2239
Line 63... Line 63...
63
# define IR_PROTOCOLS_USE_VIKING    1
63
# define IR_PROTOCOLS_USE_VIKING    1
64
#endif
64
#endif
65
#ifndef IR_PROTOCOLS_USE_VIKING_STEAK
65
#ifndef IR_PROTOCOLS_USE_VIKING_STEAK
66
# define IR_PROTOCOLS_USE_VIKING_STEAK  1
66
# define IR_PROTOCOLS_USE_VIKING_STEAK  1
67
#endif
67
#endif
-
 
68
#ifndef IR_PROTOCOLS_USE_RUBICSON
-
 
69
# define IR_PROTOCOLS_USE_RUBICSON  1
-
 
70
#endif
-
 
71
 
-
 
72
 
68
 
73
 
69
/* All these functions take a buffer with pulse times and tries to parse it
74
/* All these functions take a buffer with pulse times and tries to parse it
70
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
75
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
71
 * and IR_NOT_CORRECT_DATA if there was no match. */
76
 * and IR_NOT_CORRECT_DATA if there was no match. */
72
#if (IR_PROTOCOLS_USE_SIRC)
77
#if (IR_PROTOCOLS_USE_SIRC)
Line 98... Line 103...
98
#if (IR_PROTOCOLS_USE_NEXA2)
103
#if (IR_PROTOCOLS_USE_NEXA2)
99
int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
104
int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
100
#endif
105
#endif
101
#if (IR_PROTOCOLS_USE_NEXA1)
106
#if (IR_PROTOCOLS_USE_NEXA1)
102
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
107
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
103
#endif
108
#endif
104
#if (IR_PROTOCOLS_USE_VIKING)
109
#if (IR_PROTOCOLS_USE_VIKING)
105
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
110
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
106
#endif
111
#endif
107
#if (IR_PROTOCOLS_USE_VIKING_STEAK)
112
#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);
113
int8_t parseVikingSteak(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
109
#endif
114
#endif
-
 
115
#if (IR_PROTOCOLS_USE_RUBICSON)
-
 
116
int8_t parseRubicson(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
-
 
117
#endif
-
 
118
 
110
 
119
 
111
/* Try to parse all above protocols until a match is found. */
120
/* Try to parse all above protocols until a match is found. */
112
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
121
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
113
/* The Hash protocol always succeeds and creates a one-way signature of the
122
/* The Hash protocol always succeeds and creates a one-way signature of the
114
 * pulse times buffer that is supposed to be unique and constant for a specific
123
 * pulse times buffer that is supposed to be unique and constant for a specific
Line 239... Line 248...
239
#define IR_NEC_REPS         (1)                                 //      (minimum number of times to repeat code)
248
#define IR_NEC_REPS         (1)                                 //      (minimum number of times to repeat code)
240
#define IR_NEC_F_MOD        (38)                                //kHz   (modulation frequency)
249
#define IR_NEC_F_MOD        (38)                                //kHz   (modulation frequency)
241
#define IR_NEC_TOL_DIV      (4)
250
#define IR_NEC_TOL_DIV      (4)
242
 
251
 
243
/* Samsung Implementation
252
/* Samsung Implementation
244
 * Receiver: DONE
253
 * Receiver: DONE
245
 * Transmitter: DONE
254
 * Transmitter: DONE
246
 */
255
 */
247
#define IR_PROTO_SAMS       (6)
256
#define IR_PROTO_SAMS       (6)
248
#define IR_SAMS_ST_BIT      (4500*CYCLES_PER_US/TIMER_PRESC)    //us
257
#define IR_SAMS_ST_BIT      (4500*CYCLES_PER_US/TIMER_PRESC)    //us
249
#define IR_SAMS_ST_PAUSE    (4500*CYCLES_PER_US/TIMER_PRESC)    //us
258
#define IR_SAMS_ST_PAUSE    (4500*CYCLES_PER_US/TIMER_PRESC)    //us
250
#define IR_SAMS_LOW_ONE     (1720*CYCLES_PER_US/TIMER_PRESC)    //us
259
#define IR_SAMS_LOW_ONE     (1720*CYCLES_PER_US/TIMER_PRESC)    //us
251
#define IR_SAMS_LOW_ZERO    (650*CYCLES_PER_US/TIMER_PRESC)     //us
260
#define IR_SAMS_LOW_ZERO    (650*CYCLES_PER_US/TIMER_PRESC)     //us
Line 348... Line 357...
348
#define IR_VIKING_STEAK_LOW_START   (7800*CYCLES_PER_US/TIMER_PRESC)        //us
357
#define IR_VIKING_STEAK_LOW_START   (7800*CYCLES_PER_US/TIMER_PRESC)        //us
349
#define IR_VIKING_STEAK_TIMEOUT (200)                                   //ms BURST! (time between ir frames)
358
#define IR_VIKING_STEAK_TIMEOUT (200)                                   //ms BURST! (time between ir frames)
350
#define IR_VIKING_STEAK_REPS        (1)                                 //      (minimum number of times to repeat code)
359
#define IR_VIKING_STEAK_REPS        (1)                                 //      (minimum number of times to repeat code)
351
#define IR_VIKING_STEAK_F_MOD       (38)                                //kHz   (modulation frequency)
360
#define IR_VIKING_STEAK_F_MOD       (38)                                //kHz   (modulation frequency)
352
#define IR_VIKING_STEAK_TOL_DIV (4)
361
#define IR_VIKING_STEAK_TOL_DIV (4)
-
 
362
 
-
 
363
/* Rubicson temperature sensor Implementation
-
 
364
 * Receiver:
-
 
365
 */
-
 
366
#define IR_PROTO_RUBICSON       (14)
-
 
367
#define IR_RUBICSON_HIGH        (550*CYCLES_PER_US/TIMER_PRESC)     //us
-
 
368
#define IR_RUBICSON_LOW_ONE     (1880*CYCLES_PER_US/TIMER_PRESC)        //us
-
 
369
#define IR_RUBICSON_LOW_ZERO        (900*CYCLES_PER_US/TIMER_PRESC) //us
-
 
370
#define IR_RUBICSON_LOW_START       (3850*CYCLES_PER_US/TIMER_PRESC)        //us
-
 
371
#define IR_RUBICSON_TIMEOUT     (200)                                   //ms BURST! (time between ir frames)
-
 
372
#define IR_RUBICSON_REPS        (1)                                 //      (minimum number of times to repeat code)
-
 
373
#define IR_RUBICSON_F_MOD       (38)                                //kHz   (modulation frequency)
-
 
374
#define IR_RUBICSON_TOL_DIV     (4)
353
 
375
 
354
#define IR_PROTO_HASH       0xfe
376
#define IR_PROTO_HASH       0xfe
355
#define IR_PROTO_UNKNOWN    0xff                                //
377
#define IR_PROTO_UNKNOWN    0xff                                //
356
 
378
 
357
 
379