Subversion Repositories HomeAutomation

Rev

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

Rev 2199 Rev 2200
Line 56... Line 56...
56
#ifndef IR_PROTOCOLS_USE_NEXA2
56
#ifndef IR_PROTOCOLS_USE_NEXA2
57
# define IR_PROTOCOLS_USE_NEXA2     1
57
# define IR_PROTOCOLS_USE_NEXA2     1
58
#endif
58
#endif
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
-
 
62
#ifndef IR_PROTOCOLS_USE_VIKING
-
 
63
# define IR_PROTOCOLS_USE_VIKING    1
61
#endif
64
#endif
62
 
65
 
63
/* All these functions take a buffer with pulse times and tries to parse it
66
/* All these functions take a buffer with pulse times and tries to parse it
64
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
67
 * to a Ir_Protocol_Data_t structure. They return IR_OK on success
65
 * and IR_NOT_CORRECT_DATA if there was no match. */
68
 * and IR_NOT_CORRECT_DATA if there was no match. */
Line 78... Line 81...
78
#if (IR_PROTOCOLS_USE_SAMSUNG)
81
#if (IR_PROTOCOLS_USE_SAMSUNG)
79
int8_t parseSamsung(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
82
int8_t parseSamsung(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
80
#endif
83
#endif
81
#if (IR_PROTOCOLS_USE_MARANTZ)
84
#if (IR_PROTOCOLS_USE_MARANTZ)
82
int8_t parseMarantz(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
85
int8_t parseMarantz(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
83
#endif
86
#endif
84
#if (IR_PROTOCOLS_USE_PANASONIC)
87
#if (IR_PROTOCOLS_USE_PANASONIC)
85
int8_t parsePanasonic(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
88
int8_t parsePanasonic(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
86
#endif
89
#endif
87
#if (IR_PROTOCOLS_USE_SKY)
90
#if (IR_PROTOCOLS_USE_SKY)
88
int8_t parseSky(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
91
int8_t parseSky(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto);
Line 92... Line 95...
92
#if (IR_PROTOCOLS_USE_NEXA2)
95
#if (IR_PROTOCOLS_USE_NEXA2)
93
int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
96
int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
94
#endif
97
#endif
95
#if (IR_PROTOCOLS_USE_NEXA1)
98
#if (IR_PROTOCOLS_USE_NEXA1)
96
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
99
int8_t parseNexa1(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
-
 
100
#endif
-
 
101
#if (IR_PROTOCOLS_USE_VIKING)
-
 
102
int8_t parseViking(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
97
#endif
103
#endif
98
 
104
 
99
/* Try to parse all above protocols until a match is found. */
105
/* Try to parse all above protocols until a match is found. */
100
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
106
int8_t parseProtocol(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto);
101
/* The Hash protocol always succeeds and creates a one-way signature of the
107
/* The Hash protocol always succeeds and creates a one-way signature of the
Line 322... Line 328...
322
#define IR_VIKING_HIGH_ONE  (1483*CYCLES_PER_US/TIMER_PRESC)        //us
328
#define IR_VIKING_HIGH_ONE  (1483*CYCLES_PER_US/TIMER_PRESC)        //us
323
#define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us
329
#define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us
324
#define IR_VIKING_TIMEOUT   (0)                                 //ms BURST! (time between ir frames)
330
#define IR_VIKING_TIMEOUT   (0)                                 //ms BURST! (time between ir frames)
325
#define IR_VIKING_REPS      (1)                                 //      (minimum number of times to repeat code)
331
#define IR_VIKING_REPS      (1)                                 //      (minimum number of times to repeat code)
326
#define IR_VIKING_F_MOD     (38)                                //kHz   (modulation frequency)
332
#define IR_VIKING_F_MOD     (38)                                //kHz   (modulation frequency)
327
#define IR_VIKING_TOL_DIV   (4)
333
#define IR_VIKING_TOL_DIV   (3)
328
 
334
 
329
 
335
 
330
#define IR_PROTO_HASH       0xfe
336
#define IR_PROTO_HASH       0xfe
331
#define IR_PROTO_UNKNOWN    0xff                                //
337
#define IR_PROTO_UNKNOWN    0xff                                //
332
 
338