Rev 1929 | Rev 2120 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1929 | Rev 1931 | ||
|---|---|---|---|
| Line 19... | Line 19... | ||
| 19 | 19 | ||
| 20 | /* Protocol data structure */ |
20 | /* Protocol data structure */ |
| 21 | typedef struct { |
21 | typedef struct { |
| 22 | uint8_t protocol; |
22 | uint8_t protocol; |
| 23 | uint64_t data; |
23 | uint64_t data; |
| 24 | uint16_t timeout; |
24 | uint16_t timeout; //Set to 0 to indicate burst protocol (only one pulse train is sent) |
| 25 | uint8_t repeats; |
25 | uint8_t repeats; |
| 26 | uint16_t modfreq; |
26 | uint16_t modfreq; |
| 27 | uint8_t framecnt; |
27 | uint8_t framecnt; |
| 28 | } Ir_Protocol_Data_t; |
28 | } Ir_Protocol_Data_t; |
| 29 | 29 | ||
| Line 117... | Line 117... | ||
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | #define CYCLES_PER_US (F_CPU/1000000UL) |
119 | #define CYCLES_PER_US (F_CPU/1000000UL) |
| 120 | #define TIMER_PRESC (8) |
120 | #define TIMER_PRESC (8) |
| 121 | 121 | ||
| - | 122 | #ifndef IR_MIN_PULSE_WIDTH |
|
| 122 | #define IR_MIN_PULSE_WIDTH (0) //us, |
123 | #define IR_MIN_PULSE_WIDTH (0) //us, used in continuous mode |
| 123 | 124 | #endif |
|
| 124 | #ifndef IR_MIN_STARTPULSE_WIDTH |
125 | #ifndef IR_MIN_STARTPULSE_WIDTH |
| 125 | #define IR_MIN_STARTPULSE_WIDTH (0UL) //us, not used when set to 0 |
126 | #define IR_MIN_STARTPULSE_WIDTH (0UL) //us, not used when set to 0 |
| 126 | #endif |
127 | #endif |
| 127 | #ifndef IR_MAX_PULSE_WIDTH |
128 | #ifndef IR_MAX_PULSE_WIDTH |
| 128 | #define IR_MAX_PULSE_WIDTH (12000UL) //us |
129 | #define IR_MAX_PULSE_WIDTH (12000UL) //us |
| 129 | #endif |
130 | #endif |
| 130 | 131 | ||
| 131 | /* RC5 Implementation |
132 | /* RC5 Implementation |
| 132 | * Receiver: DONE |
133 | * Receiver: DONE |
| 133 | * Transmitter: DONE |
134 | * Transmitter: DONE |
| 134 | */ |
135 | */ |
| 135 | #define IR_PROTO_RC5 (0) |
136 | #define IR_PROTO_RC5 (0) |
| Line 139... | Line 140... | ||
| 139 | #define IR_RC5_REPS (1) // (minimum number of times to repeat code) |
140 | #define IR_RC5_REPS (1) // (minimum number of times to repeat code) |
| 140 | #define IR_RC5_F_MOD (36) //kHz (modulation frequency) |
141 | #define IR_RC5_F_MOD (36) //kHz (modulation frequency) |
| 141 | #define IR_RC5_TOL_DIV (4) |
142 | #define IR_RC5_TOL_DIV (4) |
| 142 | 143 | ||
| 143 | /* RC6 Implementation |
144 | /* RC6 Implementation |
| 144 | * Receiver: |
145 | * Receiver: |
| 145 | * Transmitter: |
146 | * Transmitter: |
| 146 | */ |
147 | */ |
| 147 | #define IR_PROTO_RC6 (1) |
148 | #define IR_PROTO_RC6 (1) |
| 148 | #define IR_RC6_ST_BIT (1*CYCLES_PER_US/TIMER_PRESC) //us |
149 | #define IR_RC6_ST_BIT (1*CYCLES_PER_US/TIMER_PRESC) //us |
| 149 | #define IR_RC6_TIMEOUT (50-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
150 | #define IR_RC6_TIMEOUT (50-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| Line 202... | Line 203... | ||
| 202 | #define IR_NEC_TIMEOUT (122-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
203 | #define IR_NEC_TIMEOUT (122-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 203 | #define IR_NEC_ST_TIMEOUT (65) //ms (time between first ir frames and second) |
204 | #define IR_NEC_ST_TIMEOUT (65) //ms (time between first ir frames and second) |
| 204 | #define IR_NEC_REPS (1) // (minimum number of times to repeat code) |
205 | #define IR_NEC_REPS (1) // (minimum number of times to repeat code) |
| 205 | #define IR_NEC_F_MOD (38) //kHz (modulation frequency) |
206 | #define IR_NEC_F_MOD (38) //kHz (modulation frequency) |
| 206 | #define IR_NEC_TOL_DIV (4) |
207 | #define IR_NEC_TOL_DIV (4) |
| 207 | 208 | ||
| 208 | /* Samsung Implementation |
209 | /* Samsung Implementation |
| 209 | * Receiver: DONE |
210 | * Receiver: DONE |
| 210 | * Transmitter: DONE |
211 | * Transmitter: DONE |
| 211 | */ |
212 | */ |
| 212 | #define IR_PROTO_SAMS (6) |
213 | #define IR_PROTO_SAMS (6) |
| Line 244... | Line 245... | ||
| 244 | #define IR_PANA_HIGH (495*CYCLES_PER_US/TIMER_PRESC) //us |
245 | #define IR_PANA_HIGH (495*CYCLES_PER_US/TIMER_PRESC) //us |
| 245 | #define IR_PANA_TIMEOUT (92-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
246 | #define IR_PANA_TIMEOUT (92-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 246 | #define IR_PANA_REPS (1) // (minimum number of times to repeat code) |
247 | #define IR_PANA_REPS (1) // (minimum number of times to repeat code) |
| 247 | #define IR_PANA_F_MOD (38) //kHz (modulation frequency) |
248 | #define IR_PANA_F_MOD (38) //kHz (modulation frequency) |
| 248 | #define IR_PANA_TOL_DIV (4) |
249 | #define IR_PANA_TOL_DIV (4) |
| 249 | 250 | ||
| 250 | /* Sky Implementation |
251 | /* Sky Implementation |
| 251 | * Receiver: DONE |
252 | * Receiver: DONE |
| 252 | * Transmitter: |
253 | * Transmitter: |
| 253 | */ |
254 | */ |
| 254 | #define IR_PROTO_SKY (9) |
255 | #define IR_PROTO_SKY (9) |
| Line 287... | Line 288... | ||
| 287 | #define IR_NEXA1_LONG (1050*CYCLES_PER_US/TIMER_PRESC) //us |
288 | #define IR_NEXA1_LONG (1050*CYCLES_PER_US/TIMER_PRESC) //us |
| 288 | #define IR_NEXA1_TIMEOUT (200) //ms (time between ir frames) |
289 | #define IR_NEXA1_TIMEOUT (200) //ms (time between ir frames) |
| 289 | #define IR_NEXA1_REPS (4) // (minimum number of times to repeat code) |
290 | #define IR_NEXA1_REPS (4) // (minimum number of times to repeat code) |
| 290 | #define IR_NEXA1_F_MOD (38) //kHz (modulation frequency) |
291 | #define IR_NEXA1_F_MOD (38) //kHz (modulation frequency) |
| 291 | #define IR_NEXA1_TOL_DIV (2) |
292 | #define IR_NEXA1_TOL_DIV (2) |
| - | 293 | ||
| - | 294 | ||
| - | 295 | /* Viking Temperature sensor Implementation |
|
| - | 296 | * Receiver: |
|
| - | 297 | */ |
|
| - | 298 | #define IR_PROTO_VIKING (12) |
|
| - | 299 | #define IR_VIKING_LOW (940*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 300 | #define IR_VIKING_HIGH_ONE (1483*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 301 | #define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 302 | #define IR_VIKING_TIMEOUT (0) //ms BURST! (time between ir frames) |
|
| - | 303 | #define IR_VIKING_REPS (1) // (minimum number of times to repeat code) |
|
| - | 304 | #define IR_VIKING_F_MOD (38) //kHz (modulation frequency) |
|
| - | 305 | #define IR_VIKING_TOL_DIV (4) |
|
| 292 | 306 | ||
| 293 | 307 | ||
| 294 | #define IR_PROTO_HASH 0xfe |
308 | #define IR_PROTO_HASH 0xfe |
| 295 | #define IR_PROTO_UNKNOWN 0xff // |
309 | #define IR_PROTO_UNKNOWN 0xff // |
| 296 | 310 | ||