Subversion Repositories HomeAutomation

Rev

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

Rev 1716 Rev 1820
Line 122... Line 122...
122
 * Transmitter: DONE
122
 * Transmitter: DONE
123
 */
123
 */
124
#define IR_PROTO_RC5        0
124
#define IR_PROTO_RC5        0
125
#define IR_RC5_HALF_BIT     889*CYCLES_PER_US/TIMER_PRESC       //us
125
#define IR_RC5_HALF_BIT     889*CYCLES_PER_US/TIMER_PRESC       //us
126
#define IR_RC5_BIT          889*2*CYCLES_PER_US/TIMER_PRESC     //us
126
#define IR_RC5_BIT          889*2*CYCLES_PER_US/TIMER_PRESC     //us
127
#define IR_RC5_TIMEOUT      105                                 //ms    (time between ir frames)
127
#define IR_RC5_TIMEOUT      (117-IR_MAX_PULSE_WIDTH/1000)                                   //ms    (time between ir frames)
128
#define IR_RC5_REPS         1                                   //      (minimum number of times to repeat code)
128
#define IR_RC5_REPS         1                                   //      (minimum number of times to repeat code)
129
#define IR_RC5_F_MOD        36                                  //kHz   (modulation frequency)
129
#define IR_RC5_F_MOD        36                                  //kHz   (modulation frequency)
130
#define IR_RC5_TOL_DIV      4
130
#define IR_RC5_TOL_DIV      4
131
 
131
 
132
/* RC6 Implementation
132
/* RC6 Implementation
133
 * Receiver:
133
 * Receiver:
134
 * Transmitter:
134
 * Transmitter:
135
 */
135
 */
136
#define IR_PROTO_RC6        1
136
#define IR_PROTO_RC6        1
137
#define IR_RC6_ST_BIT       1*CYCLES_PER_US/TIMER_PRESC         //us
137
#define IR_RC6_ST_BIT       1*CYCLES_PER_US/TIMER_PRESC         //us
138
#define IR_RC6_TIMEOUT      1                                   //ms    (time between ir frames)
138
#define IR_RC6_TIMEOUT      (50-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
139
#define IR_RC6_REPS         1                                   //      (minimum number of times to repeat code)
139
#define IR_RC6_REPS         1                                   //      (minimum number of times to repeat code)
140
#define IR_RC6_F_MOD        36                                  //kHz   (modulation frequency)
140
#define IR_RC6_F_MOD        36                                  //kHz   (modulation frequency)
141
#define IR_RC6_TOL_DIV      4
141
#define IR_RC6_TOL_DIV      4
142
 
142
 
143
/* RCMM Implementation
143
/* RCMM Implementation
144
 * Receiver:
144
 * Receiver:
145
 * Transmitter:
145
 * Transmitter:
146
 */
146
 */
147
#define IR_PROTO_RCMM       2
147
#define IR_PROTO_RCMM       2
148
#define IR_RCMM_ST_BIT      256*CYCLES_PER_US/TIMER_PRESC       //us
148
#define IR_RCMM_ST_BIT      256*CYCLES_PER_US/TIMER_PRESC       //us
149
#define IR_RCMM_TIMEOUT     158                                 //ms    (time between ir frames)
149
#define IR_RCMM_TIMEOUT     (170-IR_MAX_PULSE_WIDTH/1000)                                   //ms    (time between ir frames)
150
#define IR_RCMM_REPS        1                                   //      (minimum number of times to repeat code)
150
#define IR_RCMM_REPS        1                                   //      (minimum number of times to repeat code)
151
#define IR_RCMM_F_MOD       36                                  //kHz   (modulation frequency)
151
#define IR_RCMM_F_MOD       36                                  //kHz   (modulation frequency)
152
#define IR_RCMM_TOL_DIV     4
152
#define IR_RCMM_TOL_DIV     4
153
 
153
 
154
/* SIRC Implementation
154
/* SIRC Implementation
Line 158... Line 158...
158
#define IR_PROTO_SIRC       3
158
#define IR_PROTO_SIRC       3
159
#define IR_SIRC_ST_BIT      2400*CYCLES_PER_US/TIMER_PRESC      //us
159
#define IR_SIRC_ST_BIT      2400*CYCLES_PER_US/TIMER_PRESC      //us
160
#define IR_SIRC_LOW         600*CYCLES_PER_US/TIMER_PRESC       //us
160
#define IR_SIRC_LOW         600*CYCLES_PER_US/TIMER_PRESC       //us
161
#define IR_SIRC_HIGH_ONE    1200*CYCLES_PER_US/TIMER_PRESC      //us
161
#define IR_SIRC_HIGH_ONE    1200*CYCLES_PER_US/TIMER_PRESC      //us
162
#define IR_SIRC_HIGH_ZERO   600*CYCLES_PER_US/TIMER_PRESC       //us
162
#define IR_SIRC_HIGH_ZERO   600*CYCLES_PER_US/TIMER_PRESC       //us
163
#define IR_SIRC_TIMEOUT     40                                  //ms    (time between ir frames)
163
#define IR_SIRC_TIMEOUT     (52-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
164
#define IR_SIRC_REPS        3                                   //      (minimum number of times to repeat code)
164
#define IR_SIRC_REPS        3                                   //      (minimum number of times to repeat code)
165
#define IR_SIRC_F_MOD       40                                  //kHz   (modulation frequency)
165
#define IR_SIRC_F_MOD       40                                  //kHz   (modulation frequency)
166
#define IR_SIRC_TOL_DIV     4
166
#define IR_SIRC_TOL_DIV     4
167
 
167
 
168
/* Sharp Implementation
168
/* Sharp Implementation
Line 171... Line 171...
171
 */
171
 */
172
#define IR_PROTO_SHARP      4
172
#define IR_PROTO_SHARP      4
173
#define IR_SHARP_HIGH       280*CYCLES_PER_US/TIMER_PRESC       //us
173
#define IR_SHARP_HIGH       280*CYCLES_PER_US/TIMER_PRESC       //us
174
#define IR_SHARP_LOW_ONE    1850*CYCLES_PER_US/TIMER_PRESC      //us
174
#define IR_SHARP_LOW_ONE    1850*CYCLES_PER_US/TIMER_PRESC      //us
175
#define IR_SHARP_LOW_ZERO   780*CYCLES_PER_US/TIMER_PRESC       //us
175
#define IR_SHARP_LOW_ZERO   780*CYCLES_PER_US/TIMER_PRESC       //us
176
#define IR_SHARP_TIMEOUT    55                                  //ms    (time between ir frames)
176
#define IR_SHARP_TIMEOUT    (67-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
177
#define IR_SHARP_REPS       2                                   //      (minimum number of times to repeat code)
177
#define IR_SHARP_REPS       2                                   //      (minimum number of times to repeat code)
178
#define IR_SHARP_F_MOD      38                                  //kHz   (modulation frequency)
178
#define IR_SHARP_F_MOD      38                                  //kHz   (modulation frequency)
179
#define IR_SHARP_TOL_DIV    4
179
#define IR_SHARP_TOL_DIV    4
180
 
180
 
181
/* NEC Implementation
181
/* NEC Implementation
Line 186... Line 186...
186
#define IR_NEC_ST_BIT       9000*CYCLES_PER_US/TIMER_PRESC      //us
186
#define IR_NEC_ST_BIT       9000*CYCLES_PER_US/TIMER_PRESC      //us
187
#define IR_NEC_ST_PAUSE     4500*CYCLES_PER_US/TIMER_PRESC      //us
187
#define IR_NEC_ST_PAUSE     4500*CYCLES_PER_US/TIMER_PRESC      //us
188
#define IR_NEC_LOW_ONE      1690*CYCLES_PER_US/TIMER_PRESC      //us
188
#define IR_NEC_LOW_ONE      1690*CYCLES_PER_US/TIMER_PRESC      //us
189
#define IR_NEC_LOW_ZERO     560*CYCLES_PER_US/TIMER_PRESC       //us
189
#define IR_NEC_LOW_ZERO     560*CYCLES_PER_US/TIMER_PRESC       //us
190
#define IR_NEC_HIGH         560*CYCLES_PER_US/TIMER_PRESC       //us
190
#define IR_NEC_HIGH         560*CYCLES_PER_US/TIMER_PRESC       //us
191
#define IR_NEC_TIMEOUT      110                                 //ms    (time between ir frames)
191
#define IR_NEC_TIMEOUT      (122-IR_MAX_PULSE_WIDTH/1000)                                   //ms    (time between ir frames)
192
#define IR_NEC_ST_TIMEOUT   65                                  //ms    (time between first ir frames and second)
192
#define IR_NEC_ST_TIMEOUT   65                                  //ms    (time between first ir frames and second)
193
#define IR_NEC_REPS         1                                   //      (minimum number of times to repeat code)
193
#define IR_NEC_REPS         1                                   //      (minimum number of times to repeat code)
194
#define IR_NEC_F_MOD        38                                  //kHz   (modulation frequency)
194
#define IR_NEC_F_MOD        38                                  //kHz   (modulation frequency)
195
#define IR_NEC_TOL_DIV      4
195
#define IR_NEC_TOL_DIV      4
196
 
196
 
Line 202... Line 202...
202
#define IR_SAMS_ST_BIT      4500*CYCLES_PER_US/TIMER_PRESC      //us
202
#define IR_SAMS_ST_BIT      4500*CYCLES_PER_US/TIMER_PRESC      //us
203
#define IR_SAMS_ST_PAUSE    4500*CYCLES_PER_US/TIMER_PRESC      //us
203
#define IR_SAMS_ST_PAUSE    4500*CYCLES_PER_US/TIMER_PRESC      //us
204
#define IR_SAMS_LOW_ONE     1720*CYCLES_PER_US/TIMER_PRESC      //us
204
#define IR_SAMS_LOW_ONE     1720*CYCLES_PER_US/TIMER_PRESC      //us
205
#define IR_SAMS_LOW_ZERO    650*CYCLES_PER_US/TIMER_PRESC       //us
205
#define IR_SAMS_LOW_ZERO    650*CYCLES_PER_US/TIMER_PRESC       //us
206
#define IR_SAMS_HIGH        500*CYCLES_PER_US/TIMER_PRESC       //us
206
#define IR_SAMS_HIGH        500*CYCLES_PER_US/TIMER_PRESC       //us
207
#define IR_SAMS_TIMEOUT     50                                  //ms    (time between ir frames)
207
#define IR_SAMS_TIMEOUT     (62-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
208
#define IR_SAMS_REPS        1                                   //      (minimum number of times to repeat code)
208
#define IR_SAMS_REPS        1                                   //      (minimum number of times to repeat code)
209
#define IR_SAMS_F_MOD       38                                  //kHz   (modulation frequency)
209
#define IR_SAMS_F_MOD       38                                  //kHz   (modulation frequency)
210
#define IR_SAMS_TOL_DIV     4
210
#define IR_SAMS_TOL_DIV     4
211
 
211
 
212
/* Marantz Implementation
212
/* Marantz Implementation
Line 214... Line 214...
214
 * Transmitter: DONE
214
 * Transmitter: DONE
215
 */
215
 */
216
#define IR_PROTO_MARANTZ        7
216
#define IR_PROTO_MARANTZ        7
217
#define IR_MARANTZ_HALF_BIT     889*CYCLES_PER_US/TIMER_PRESC       //us
217
#define IR_MARANTZ_HALF_BIT     889*CYCLES_PER_US/TIMER_PRESC       //us
218
#define IR_MARANTZ_BIT          889*2*CYCLES_PER_US/TIMER_PRESC     //us
218
#define IR_MARANTZ_BIT          889*2*CYCLES_PER_US/TIMER_PRESC     //us
219
#define IR_MARANTZ_TIMEOUT      105                                 //ms    (time between ir frames)
219
#define IR_MARANTZ_TIMEOUT      (117-IR_MAX_PULSE_WIDTH/1000)                                   //ms    (time between ir frames)
220
#define IR_MARANTZ_REPS         1                                   //      (minimum number of times to repeat code)
220
#define IR_MARANTZ_REPS         1                                   //      (minimum number of times to repeat code)
221
#define IR_MARANTZ_F_MOD        36                                  //kHz   (modulation frequency)
221
#define IR_MARANTZ_F_MOD        36                                  //kHz   (modulation frequency)
222
#define IR_MARANTZ_TOL_DIV      4
222
#define IR_MARANTZ_TOL_DIV      4
223
 
223
 
224
/* Panasonic Implementation
224
/* Panasonic Implementation
Line 229... Line 229...
229
#define IR_PANA_ST_BIT      3570*CYCLES_PER_US/TIMER_PRESC      //us
229
#define IR_PANA_ST_BIT      3570*CYCLES_PER_US/TIMER_PRESC      //us
230
#define IR_PANA_ST_PAUSE    1630*CYCLES_PER_US/TIMER_PRESC      //us
230
#define IR_PANA_ST_PAUSE    1630*CYCLES_PER_US/TIMER_PRESC      //us
231
#define IR_PANA_LOW_ONE     1240*CYCLES_PER_US/TIMER_PRESC      //us
231
#define IR_PANA_LOW_ONE     1240*CYCLES_PER_US/TIMER_PRESC      //us
232
#define IR_PANA_LOW_ZERO    400*CYCLES_PER_US/TIMER_PRESC       //us
232
#define IR_PANA_LOW_ZERO    400*CYCLES_PER_US/TIMER_PRESC       //us
233
#define IR_PANA_HIGH        495*CYCLES_PER_US/TIMER_PRESC       //us
233
#define IR_PANA_HIGH        495*CYCLES_PER_US/TIMER_PRESC       //us
234
#define IR_PANA_TIMEOUT     80                                  //ms    (time between ir frames)
234
#define IR_PANA_TIMEOUT     (92-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
235
#define IR_PANA_REPS        1                                   //      (minimum number of times to repeat code)
235
#define IR_PANA_REPS        1                                   //      (minimum number of times to repeat code)
236
#define IR_PANA_F_MOD       38                                  //kHz   (modulation frequency)
236
#define IR_PANA_F_MOD       38                                  //kHz   (modulation frequency)
237
#define IR_PANA_TOL_DIV     4
237
#define IR_PANA_TOL_DIV     4
238
 
238
 
239
/* Sky Implementation
239
/* Sky Implementation
Line 242... Line 242...
242
 */
242
 */
243
#define IR_PROTO_SKY        9
243
#define IR_PROTO_SKY        9
244
#define IR_SKY_ST_BIT       2800*CYCLES_PER_US/TIMER_PRESC      //us
244
#define IR_SKY_ST_BIT       2800*CYCLES_PER_US/TIMER_PRESC      //us
245
#define IR_SKY_SHORT        460*CYCLES_PER_US/TIMER_PRESC       //us
245
#define IR_SKY_SHORT        460*CYCLES_PER_US/TIMER_PRESC       //us
246
#define IR_SKY_LONG         920*CYCLES_PER_US/TIMER_PRESC       //us
246
#define IR_SKY_LONG         920*CYCLES_PER_US/TIMER_PRESC       //us
247
#define IR_SKY_TIMEOUT      150                                 //ms    (time between ir frames)
247
#define IR_SKY_TIMEOUT      (162-IR_MAX_PULSE_WIDTH/1000)                                   //ms    (time between ir frames)
248
#define IR_SKY_REPS         1                                   //      (minimum number of times to repeat code)
248
#define IR_SKY_REPS         1                                   //      (minimum number of times to repeat code)
249
#define IR_SKY_F_MOD        38                                  //kHz   (modulation frequency)
249
#define IR_SKY_F_MOD        38                                  //kHz   (modulation frequency)
250
#define IR_SKY_TOL_DIV      4
250
#define IR_SKY_TOL_DIV      4
251
 
251
 
252
 
252
 
Line 257... Line 257...
257
#define IR_PROTO_NEXA2      10
257
#define IR_PROTO_NEXA2      10
258
#define IR_NEXA2_START      2500*CYCLES_PER_US/TIMER_PRESC      //us
258
#define IR_NEXA2_START      2500*CYCLES_PER_US/TIMER_PRESC      //us
259
#define IR_NEXA2_HIGH       320*CYCLES_PER_US/TIMER_PRESC       //us
259
#define IR_NEXA2_HIGH       320*CYCLES_PER_US/TIMER_PRESC       //us
260
#define IR_NEXA2_LOW_ONE    210*CYCLES_PER_US/TIMER_PRESC       //us
260
#define IR_NEXA2_LOW_ONE    210*CYCLES_PER_US/TIMER_PRESC       //us
261
#define IR_NEXA2_LOW_ZERO   1200*CYCLES_PER_US/TIMER_PRESC      //us
261
#define IR_NEXA2_LOW_ZERO   1200*CYCLES_PER_US/TIMER_PRESC      //us
262
#define IR_NEXA2_TIMEOUT    10                                  //ms    (time between ir frames)
262
#define IR_NEXA2_TIMEOUT    (22-IR_MAX_PULSE_WIDTH/1000)                                    //ms    (time between ir frames)
263
#define IR_NEXA2_REPS       4                                   //      (minimum number of times to repeat code)
263
#define IR_NEXA2_REPS       4                                   //      (minimum number of times to repeat code)
264
#define IR_NEXA2_TOL_DIV    4
264
#define IR_NEXA2_TOL_DIV    4
265
 
265
 
266
 
266
 
267
#define IR_PROTO_HASH       0xfe
267
#define IR_PROTO_HASH       0xfe