Rev 2239 | Rev 2246 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 2239 | Rev 2244 | ||
|---|---|---|---|
| Line 50... | Line 50... | ||
| 50 | #ifndef IR_PROTOCOLS_USE_PANASONIC |
50 | #ifndef IR_PROTOCOLS_USE_PANASONIC |
| 51 | # define IR_PROTOCOLS_USE_PANASONIC 1 |
51 | # define IR_PROTOCOLS_USE_PANASONIC 1 |
| 52 | #endif |
52 | #endif |
| 53 | #ifndef IR_PROTOCOLS_USE_SKY |
53 | #ifndef IR_PROTOCOLS_USE_SKY |
| 54 | # define IR_PROTOCOLS_USE_SKY 1 |
54 | # define IR_PROTOCOLS_USE_SKY 1 |
| - | 55 | #endif |
|
| - | 56 | #ifndef IR_PROTOCOLS_USE_IROBOT |
|
| - | 57 | # define IR_PROTOCOLS_USE_IROBOT 1 |
|
| 55 | #endif |
58 | #endif |
| 56 | #ifndef IR_PROTOCOLS_USE_NEXA2 |
59 | #ifndef IR_PROTOCOLS_USE_NEXA2 |
| 57 | # define IR_PROTOCOLS_USE_NEXA2 1 |
60 | # define IR_PROTOCOLS_USE_NEXA2 1 |
| 58 | #endif |
61 | #endif |
| 59 | #ifndef IR_PROTOCOLS_USE_NEXA1 |
62 | #ifndef IR_PROTOCOLS_USE_NEXA1 |
| Line 62... | Line 65... | ||
| 62 | #ifndef IR_PROTOCOLS_USE_VIKING |
65 | #ifndef IR_PROTOCOLS_USE_VIKING |
| 63 | # define IR_PROTOCOLS_USE_VIKING 1 |
66 | # define IR_PROTOCOLS_USE_VIKING 1 |
| 64 | #endif |
67 | #endif |
| 65 | #ifndef IR_PROTOCOLS_USE_VIKING_STEAK |
68 | #ifndef IR_PROTOCOLS_USE_VIKING_STEAK |
| 66 | # define IR_PROTOCOLS_USE_VIKING_STEAK 1 |
69 | # define IR_PROTOCOLS_USE_VIKING_STEAK 1 |
| 67 | #endif |
70 | #endif |
| 68 | #ifndef IR_PROTOCOLS_USE_RUBICSON |
71 | #ifndef IR_PROTOCOLS_USE_RUBICSON |
| 69 | # define IR_PROTOCOLS_USE_RUBICSON 1 |
72 | # define IR_PROTOCOLS_USE_RUBICSON 1 |
| 70 | #endif |
73 | #endif |
| 71 | 74 | ||
| 72 | 75 | ||
| 73 | 76 | ||
| 74 | /* All these functions take a buffer with pulse times and tries to parse it |
77 | /* All these functions take a buffer with pulse times and tries to parse it |
| 75 | * to a Ir_Protocol_Data_t structure. They return IR_OK on success |
78 | * to a Ir_Protocol_Data_t structure. They return IR_OK on success |
| Line 80... | Line 83... | ||
| 80 | #if (IR_PROTOCOLS_USE_RC5) |
83 | #if (IR_PROTOCOLS_USE_RC5) |
| 81 | int8_t parseRC5(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
84 | int8_t parseRC5(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 82 | #endif |
85 | #endif |
| 83 | #if (IR_PROTOCOLS_USE_SHARP) |
86 | #if (IR_PROTOCOLS_USE_SHARP) |
| 84 | int8_t parseSharp(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
87 | int8_t parseSharp(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 85 | #endif |
88 | #endif |
| 86 | #if (IR_PROTOCOLS_USE_NEC) |
89 | #if (IR_PROTOCOLS_USE_NEC) |
| 87 | int8_t parseNEC(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
90 | int8_t parseNEC(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 88 | #endif |
91 | #endif |
| 89 | #if (IR_PROTOCOLS_USE_SAMSUNG) |
92 | #if (IR_PROTOCOLS_USE_SAMSUNG) |
| 90 | int8_t parseSamsung(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
93 | int8_t parseSamsung(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 91 | #endif |
94 | #endif |
| 92 | #if (IR_PROTOCOLS_USE_MARANTZ) |
95 | #if (IR_PROTOCOLS_USE_MARANTZ) |
| 93 | int8_t parseMarantz(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
96 | int8_t parseMarantz(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 94 | #endif |
97 | #endif |
| 95 | #if (IR_PROTOCOLS_USE_PANASONIC) |
98 | #if (IR_PROTOCOLS_USE_PANASONIC) |
| 96 | int8_t parsePanasonic(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
99 | int8_t parsePanasonic(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 97 | #endif |
100 | #endif |
| 98 | #if (IR_PROTOCOLS_USE_SKY) |
101 | #if (IR_PROTOCOLS_USE_SKY) |
| 99 | int8_t parseSky(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
102 | int8_t parseSky(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
| 100 | #endif |
103 | #endif |
| - | 104 | #if (IR_PROTOCOLS_USE_IROBOT) |
|
| - | 105 | int8_t parseiRobot(const uint16_t *buf, uint8_t len, Ir_Protocol_Data_t *proto); |
|
| - | 106 | #endif |
|
| - | 107 | ||
| 101 | 108 | ||
| 102 | /* RF protocols needs index parameter */ |
109 | /* RF protocols needs index parameter */ |
| 103 | #if (IR_PROTOCOLS_USE_NEXA2) |
110 | #if (IR_PROTOCOLS_USE_NEXA2) |
| 104 | int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto); |
111 | int8_t parseNexa2(const uint16_t *buf, uint8_t len, uint8_t index, Ir_Protocol_Data_t *proto); |
| 105 | #endif |
112 | #endif |
| Line 135... | Line 142... | ||
| 135 | int8_t expandNEC(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
142 | int8_t expandNEC(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 136 | int8_t expandSamsung(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
143 | int8_t expandSamsung(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 137 | int8_t expandMarantz(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
144 | int8_t expandMarantz(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 138 | int8_t expandPanasonic(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
145 | int8_t expandPanasonic(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 139 | int8_t expandSky(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
146 | int8_t expandSky(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| - | 147 | int8_t expandiRobot(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
|
| 140 | int8_t expandNexa2(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
148 | int8_t expandNexa2(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 141 | int8_t expandNexa1(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
149 | int8_t expandNexa1(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 142 | /* Pass the Ir_Protocol_Data_t automatically to the correct function. */ |
150 | /* Pass the Ir_Protocol_Data_t automatically to the correct function. */ |
| 143 | int8_t expandProtocol(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
151 | int8_t expandProtocol(uint16_t *buf, uint8_t *len, Ir_Protocol_Data_t *proto); |
| 144 | 152 | ||
| 145 | 153 | ||
| 146 | #define IR_OK 1 |
154 | #define IR_OK 1 |
| 147 | #define IR_NO_PROTOCOL 2 |
155 | #define IR_NO_PROTOCOL 2 |
| 148 | #define IR_TIME_OVFL 3 |
156 | #define IR_TIME_OVFL 3 |
| 149 | #define IR_NO_DATA 4 |
157 | #define IR_NO_DATA 4 |
| 150 | #define IR_NOT_CORRECT_DATA 5 |
158 | #define IR_NOT_CORRECT_DATA 5 |
| Line 174... | Line 182... | ||
| 174 | 182 | ||
| 175 | /* RC5 Implementation |
183 | /* RC5 Implementation |
| 176 | * Receiver: DONE |
184 | * Receiver: DONE |
| 177 | * Transmitter: DONE |
185 | * Transmitter: DONE |
| 178 | */ |
186 | */ |
| 179 | #define IR_PROTO_RC5 (0) |
- | |
| 180 | #define IR_RC5_HALF_BIT (889*CYCLES_PER_US/TIMER_PRESC) //us |
187 | #define IR_RC5_HALF_BIT (889*CYCLES_PER_US/TIMER_PRESC) //us |
| 181 | #define IR_RC5_BIT (889*2*CYCLES_PER_US/TIMER_PRESC) //us |
188 | #define IR_RC5_BIT (889*2*CYCLES_PER_US/TIMER_PRESC) //us |
| 182 | #define IR_RC5_TIMEOUT (117-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
189 | #define IR_RC5_TIMEOUT (117-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 183 | #define IR_RC5_REPS (1) // (minimum number of times to repeat code) |
190 | #define IR_RC5_REPS (1) // (minimum number of times to repeat code) |
| 184 | #define IR_RC5_F_MOD (36) //kHz (modulation frequency) |
191 | #define IR_RC5_F_MOD (36) //kHz (modulation frequency) |
| Line 186... | Line 193... | ||
| 186 | 193 | ||
| 187 | /* RC6 Implementation |
194 | /* RC6 Implementation |
| 188 | * Receiver: |
195 | * Receiver: |
| 189 | * Transmitter: |
196 | * Transmitter: |
| 190 | */ |
197 | */ |
| 191 | #define IR_PROTO_RC6 (1) |
- | |
| 192 | #define IR_RC6_ST_BIT (1*CYCLES_PER_US/TIMER_PRESC) //us |
198 | #define IR_RC6_ST_BIT (1*CYCLES_PER_US/TIMER_PRESC) //us |
| 193 | #define IR_RC6_TIMEOUT (50-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
199 | #define IR_RC6_TIMEOUT (50-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 194 | #define IR_RC6_REPS (1) // (minimum number of times to repeat code) |
200 | #define IR_RC6_REPS (1) // (minimum number of times to repeat code) |
| 195 | #define IR_RC6_F_MOD (36) //kHz (modulation frequency) |
201 | #define IR_RC6_F_MOD (36) //kHz (modulation frequency) |
| 196 | #define IR_RC6_TOL_DIV (4) |
202 | #define IR_RC6_TOL_DIV (4) |
| 197 | 203 | ||
| 198 | /* RCMM Implementation |
204 | /* RCMM Implementation |
| 199 | * Receiver: |
205 | * Receiver: |
| 200 | * Transmitter: |
206 | * Transmitter: |
| 201 | */ |
207 | */ |
| 202 | #define IR_PROTO_RCMM (2) |
- | |
| 203 | #define IR_RCMM_ST_BIT (256*CYCLES_PER_US/TIMER_PRESC) //us |
208 | #define IR_RCMM_ST_BIT (256*CYCLES_PER_US/TIMER_PRESC) //us |
| 204 | #define IR_RCMM_TIMEOUT (170-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
209 | #define IR_RCMM_TIMEOUT (170-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 205 | #define IR_RCMM_REPS (1) // (minimum number of times to repeat code) |
210 | #define IR_RCMM_REPS (1) // (minimum number of times to repeat code) |
| 206 | #define IR_RCMM_F_MOD (36) //kHz (modulation frequency) |
211 | #define IR_RCMM_F_MOD (36) //kHz (modulation frequency) |
| 207 | #define IR_RCMM_TOL_DIV (4) |
212 | #define IR_RCMM_TOL_DIV (4) |
| 208 | 213 | ||
| 209 | /* SIRC Implementation |
214 | /* SIRC Implementation |
| 210 | * Receiver: DONE |
215 | * Receiver: DONE |
| 211 | * Transmitter: DONE |
216 | * Transmitter: DONE |
| 212 | */ |
217 | */ |
| 213 | #define IR_PROTO_SIRC (3) |
- | |
| 214 | #define IR_SIRC_ST_BIT (2400*CYCLES_PER_US/TIMER_PRESC) //us |
218 | #define IR_SIRC_ST_BIT (2400*CYCLES_PER_US/TIMER_PRESC) //us |
| 215 | #define IR_SIRC_LOW (600*CYCLES_PER_US/TIMER_PRESC) //us |
219 | #define IR_SIRC_LOW (600*CYCLES_PER_US/TIMER_PRESC) //us |
| 216 | #define IR_SIRC_HIGH_ONE (1200*CYCLES_PER_US/TIMER_PRESC) //us |
220 | #define IR_SIRC_HIGH_ONE (1200*CYCLES_PER_US/TIMER_PRESC) //us |
| 217 | #define IR_SIRC_HIGH_ZERO (600*CYCLES_PER_US/TIMER_PRESC) //us |
221 | #define IR_SIRC_HIGH_ZERO (600*CYCLES_PER_US/TIMER_PRESC) //us |
| 218 | #define IR_SIRC_TIMEOUT (52-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
222 | #define IR_SIRC_TIMEOUT (52-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| Line 222... | Line 226... | ||
| 222 | 226 | ||
| 223 | /* Sharp Implementation |
227 | /* Sharp Implementation |
| 224 | * Receiver: DONE |
228 | * Receiver: DONE |
| 225 | * Transmitter: |
229 | * Transmitter: |
| 226 | */ |
230 | */ |
| 227 | #define IR_PROTO_SHARP (4) |
- | |
| 228 | #define IR_SHARP_HIGH (280*CYCLES_PER_US/TIMER_PRESC) //us |
231 | #define IR_SHARP_HIGH (280*CYCLES_PER_US/TIMER_PRESC) //us |
| 229 | #define IR_SHARP_LOW_ONE (1850*CYCLES_PER_US/TIMER_PRESC) //us |
232 | #define IR_SHARP_LOW_ONE (1850*CYCLES_PER_US/TIMER_PRESC) //us |
| 230 | #define IR_SHARP_LOW_ZERO (780*CYCLES_PER_US/TIMER_PRESC) //us |
233 | #define IR_SHARP_LOW_ZERO (780*CYCLES_PER_US/TIMER_PRESC) //us |
| 231 | #define IR_SHARP_TIMEOUT (67-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
234 | #define IR_SHARP_TIMEOUT (67-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 232 | #define IR_SHARP_REPS (2) // (minimum number of times to repeat code) |
235 | #define IR_SHARP_REPS (2) // (minimum number of times to repeat code) |
| Line 235... | Line 238... | ||
| 235 | 238 | ||
| 236 | /* NEC Implementation |
239 | /* NEC Implementation |
| 237 | * Receiver: DONE |
240 | * Receiver: DONE |
| 238 | * Transmitter: DONE |
241 | * Transmitter: DONE |
| 239 | */ |
242 | */ |
| 240 | #define IR_PROTO_NEC (5) |
- | |
| 241 | #define IR_NEC_ST_BIT (9000*CYCLES_PER_US/TIMER_PRESC) //us |
243 | #define IR_NEC_ST_BIT (9000*CYCLES_PER_US/TIMER_PRESC) //us |
| 242 | #define IR_NEC_ST_PAUSE (4500*CYCLES_PER_US/TIMER_PRESC) //us |
244 | #define IR_NEC_ST_PAUSE (4500*CYCLES_PER_US/TIMER_PRESC) //us |
| 243 | #define IR_NEC_LOW_ONE (1690*CYCLES_PER_US/TIMER_PRESC) //us |
245 | #define IR_NEC_LOW_ONE (1690*CYCLES_PER_US/TIMER_PRESC) //us |
| 244 | #define IR_NEC_LOW_ZERO (560*CYCLES_PER_US/TIMER_PRESC) //us |
246 | #define IR_NEC_LOW_ZERO (560*CYCLES_PER_US/TIMER_PRESC) //us |
| 245 | #define IR_NEC_HIGH (560*CYCLES_PER_US/TIMER_PRESC) //us |
247 | #define IR_NEC_HIGH (560*CYCLES_PER_US/TIMER_PRESC) //us |
| Line 251... | Line 253... | ||
| 251 | 253 | ||
| 252 | /* Samsung Implementation |
254 | /* Samsung Implementation |
| 253 | * Receiver: DONE |
255 | * Receiver: DONE |
| 254 | * Transmitter: DONE |
256 | * Transmitter: DONE |
| 255 | */ |
257 | */ |
| 256 | #define IR_PROTO_SAMS (6) |
- | |
| 257 | #define IR_SAMS_ST_BIT (4500*CYCLES_PER_US/TIMER_PRESC) //us |
258 | #define IR_SAMS_ST_BIT (4500*CYCLES_PER_US/TIMER_PRESC) //us |
| 258 | #define IR_SAMS_ST_PAUSE (4500*CYCLES_PER_US/TIMER_PRESC) //us |
259 | #define IR_SAMS_ST_PAUSE (4500*CYCLES_PER_US/TIMER_PRESC) //us |
| 259 | #define IR_SAMS_LOW_ONE (1720*CYCLES_PER_US/TIMER_PRESC) //us |
260 | #define IR_SAMS_LOW_ONE (1720*CYCLES_PER_US/TIMER_PRESC) //us |
| 260 | #define IR_SAMS_LOW_ZERO (650*CYCLES_PER_US/TIMER_PRESC) //us |
261 | #define IR_SAMS_LOW_ZERO (650*CYCLES_PER_US/TIMER_PRESC) //us |
| 261 | #define IR_SAMS_HIGH (500*CYCLES_PER_US/TIMER_PRESC) //us |
262 | #define IR_SAMS_HIGH (500*CYCLES_PER_US/TIMER_PRESC) //us |
| Line 266... | Line 267... | ||
| 266 | 267 | ||
| 267 | /* Marantz Implementation |
268 | /* Marantz Implementation |
| 268 | * Receiver: DONE (has not been tested with odd adressbits) |
269 | * Receiver: DONE (has not been tested with odd adressbits) |
| 269 | * Transmitter: DONE |
270 | * Transmitter: DONE |
| 270 | */ |
271 | */ |
| 271 | #define IR_PROTO_MARANTZ (7) |
- | |
| 272 | #define IR_MARANTZ_HALF_BIT (889*CYCLES_PER_US/TIMER_PRESC) //us |
272 | #define IR_MARANTZ_HALF_BIT (889*CYCLES_PER_US/TIMER_PRESC) //us |
| 273 | #define IR_MARANTZ_BIT (889*2*CYCLES_PER_US/TIMER_PRESC) //us |
273 | #define IR_MARANTZ_BIT (889*2*CYCLES_PER_US/TIMER_PRESC) //us |
| 274 | #define IR_MARANTZ_TIMEOUT (117-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
274 | #define IR_MARANTZ_TIMEOUT (117-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 275 | #define IR_MARANTZ_REPS (1) // (minimum number of times to repeat code) |
275 | #define IR_MARANTZ_REPS (1) // (minimum number of times to repeat code) |
| 276 | #define IR_MARANTZ_F_MOD (36) //kHz (modulation frequency) |
276 | #define IR_MARANTZ_F_MOD (36) //kHz (modulation frequency) |
| Line 278... | Line 278... | ||
| 278 | 278 | ||
| 279 | /* Panasonic Implementation |
279 | /* Panasonic Implementation |
| 280 | * Receiver: DONE |
280 | * Receiver: DONE |
| 281 | * Transmitter: DONE |
281 | * Transmitter: DONE |
| 282 | */ |
282 | */ |
| 283 | #define IR_PROTO_PANASONIC (8) |
- | |
| 284 | #define IR_PANA_ST_BIT (3570*CYCLES_PER_US/TIMER_PRESC) //us |
283 | #define IR_PANA_ST_BIT (3570*CYCLES_PER_US/TIMER_PRESC) //us |
| 285 | #define IR_PANA_ST_PAUSE (1630*CYCLES_PER_US/TIMER_PRESC) //us |
284 | #define IR_PANA_ST_PAUSE (1630*CYCLES_PER_US/TIMER_PRESC) //us |
| 286 | #define IR_PANA_LOW_ONE (1240*CYCLES_PER_US/TIMER_PRESC) //us |
285 | #define IR_PANA_LOW_ONE (1240*CYCLES_PER_US/TIMER_PRESC) //us |
| 287 | #define IR_PANA_LOW_ZERO (400*CYCLES_PER_US/TIMER_PRESC) //us |
286 | #define IR_PANA_LOW_ZERO (400*CYCLES_PER_US/TIMER_PRESC) //us |
| 288 | #define IR_PANA_HIGH (495*CYCLES_PER_US/TIMER_PRESC) //us |
287 | #define IR_PANA_HIGH (495*CYCLES_PER_US/TIMER_PRESC) //us |
| Line 293... | Line 292... | ||
| 293 | 292 | ||
| 294 | /* Sky Implementation |
293 | /* Sky Implementation |
| 295 | * Receiver: DONE |
294 | * Receiver: DONE |
| 296 | * Transmitter: |
295 | * Transmitter: |
| 297 | */ |
296 | */ |
| 298 | #define IR_PROTO_SKY (9) |
- | |
| 299 | #define IR_SKY_ST_BIT (2800*CYCLES_PER_US/TIMER_PRESC) //us |
297 | #define IR_SKY_ST_BIT (2800*CYCLES_PER_US/TIMER_PRESC) //us |
| 300 | #define IR_SKY_SHORT (460*CYCLES_PER_US/TIMER_PRESC) //us |
298 | #define IR_SKY_SHORT (460*CYCLES_PER_US/TIMER_PRESC) //us |
| 301 | #define IR_SKY_LONG (920*CYCLES_PER_US/TIMER_PRESC) //us |
299 | #define IR_SKY_LONG (920*CYCLES_PER_US/TIMER_PRESC) //us |
| 302 | #define IR_SKY_TIMEOUT (162-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
300 | #define IR_SKY_TIMEOUT (162-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
| 303 | #define IR_SKY_REPS (1) // (minimum number of times to repeat code) |
301 | #define IR_SKY_REPS (1) // (minimum number of times to repeat code) |
| 304 | #define IR_SKY_F_MOD (38) //kHz (modulation frequency) |
302 | #define IR_SKY_F_MOD (38) //kHz (modulation frequency) |
| 305 | #define IR_SKY_TOL_DIV (4) |
303 | #define IR_SKY_TOL_DIV (4) |
| - | 304 | ||
| - | 305 | /* iRobot Implementation |
|
| - | 306 | * Receiver: - |
|
| - | 307 | * Transmitter: DONE |
|
| - | 308 | */ |
|
| - | 309 | #define IR_IROBOT_ST_BIT (2800*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 310 | #define IR_IROBOT_SHORT (1000*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 311 | #define IR_IROBOT_LONG (3000*CYCLES_PER_US/TIMER_PRESC) //us |
|
| - | 312 | #define IR_IROBOT_TIMEOUT (162-IR_MAX_PULSE_WIDTH/1000) //ms (time between ir frames) |
|
| - | 313 | #define IR_IROBOT_REPS (3) // (minimum number of times to repeat code) |
|
| - | 314 | #define IR_IROBOT_F_MOD (40) //kHz (modulation frequency) |
|
| - | 315 | #define IR_IROBOT_TOL_DIV (4) |
|
| 306 | 316 | ||
| 307 | 317 | ||
| 308 | /* Nexa2 Implementation |
318 | /* Nexa2 Implementation |
| 309 | * Receiver: DONE |
319 | * Receiver: DONE |
| 310 | * Transmitter: DONE |
320 | * Transmitter: DONE |
| 311 | */ |
321 | */ |
| 312 | #define IR_PROTO_NEXA2 (10) |
- | |
| 313 | #define IR_NEXA2_START1 (10000*CYCLES_PER_US/TIMER_PRESC) //us |
322 | #define IR_NEXA2_START1 (10000*CYCLES_PER_US/TIMER_PRESC) //us |
| 314 | #define IR_NEXA2_START2 (2500*CYCLES_PER_US/TIMER_PRESC) //us |
323 | #define IR_NEXA2_START2 (2500*CYCLES_PER_US/TIMER_PRESC) //us |
| 315 | #define IR_NEXA2_HIGH (320*CYCLES_PER_US/TIMER_PRESC) //us |
324 | #define IR_NEXA2_HIGH (320*CYCLES_PER_US/TIMER_PRESC) //us |
| 316 | #define IR_NEXA2_LOW_ONE (210*CYCLES_PER_US/TIMER_PRESC) //us |
325 | #define IR_NEXA2_LOW_ONE (210*CYCLES_PER_US/TIMER_PRESC) //us |
| 317 | #define IR_NEXA2_LOW_ZERO (1200*CYCLES_PER_US/TIMER_PRESC) //us |
326 | #define IR_NEXA2_LOW_ZERO (1200*CYCLES_PER_US/TIMER_PRESC) //us |
| Line 323... | Line 332... | ||
| 323 | 332 | ||
| 324 | /* Nexa1 Implementation |
333 | /* Nexa1 Implementation |
| 325 | * Receiver: DONE |
334 | * Receiver: DONE |
| 326 | * Transmitter: |
335 | * Transmitter: |
| 327 | */ |
336 | */ |
| 328 | #define IR_PROTO_NEXA1 (11) |
- | |
| 329 | #define IR_NEXA1_START (10000*CYCLES_PER_US/TIMER_PRESC) //us |
337 | #define IR_NEXA1_START (10000*CYCLES_PER_US/TIMER_PRESC) //us |
| 330 | #define IR_NEXA1_SHORT (370*CYCLES_PER_US/TIMER_PRESC) //us |
338 | #define IR_NEXA1_SHORT (370*CYCLES_PER_US/TIMER_PRESC) //us |
| 331 | #define IR_NEXA1_LONG (1050*CYCLES_PER_US/TIMER_PRESC) //us |
339 | #define IR_NEXA1_LONG (1050*CYCLES_PER_US/TIMER_PRESC) //us |
| 332 | #define IR_NEXA1_TIMEOUT (200) //ms (time between ir frames) |
340 | #define IR_NEXA1_TIMEOUT (200) //ms (time between ir frames) |
| 333 | #define IR_NEXA1_REPS (4) // (minimum number of times to repeat code) |
341 | #define IR_NEXA1_REPS (4) // (minimum number of times to repeat code) |
| Line 336... | Line 344... | ||
| 336 | 344 | ||
| 337 | 345 | ||
| 338 | /* Viking Temperature sensor Implementation |
346 | /* Viking Temperature sensor Implementation |
| 339 | * Receiver: |
347 | * Receiver: |
| 340 | */ |
348 | */ |
| 341 | #define IR_PROTO_VIKING (12) |
- | |
| 342 | #define IR_VIKING_LOW (940*CYCLES_PER_US/TIMER_PRESC) //us |
349 | #define IR_VIKING_LOW (940*CYCLES_PER_US/TIMER_PRESC) //us |
| 343 | #define IR_VIKING_HIGH_ONE (1483*CYCLES_PER_US/TIMER_PRESC) //us |
350 | #define IR_VIKING_HIGH_ONE (1483*CYCLES_PER_US/TIMER_PRESC) //us |
| 344 | #define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us |
351 | #define IR_VIKING_HIGH_ZERO (550*CYCLES_PER_US/TIMER_PRESC) //us |
| 345 | #define IR_VIKING_TIMEOUT (0) //ms BURST! (time between ir frames) |
352 | #define IR_VIKING_TIMEOUT (0) //ms BURST! (time between ir frames) |
| 346 | #define IR_VIKING_REPS (1) // (minimum number of times to repeat code) |
353 | #define IR_VIKING_REPS (1) // (minimum number of times to repeat code) |
| Line 348... | Line 355... | ||
| 348 | #define IR_VIKING_TOL_DIV (3) |
355 | #define IR_VIKING_TOL_DIV (3) |
| 349 | 356 | ||
| 350 | /* Viking Steak temperature sensor Implementation |
357 | /* Viking Steak temperature sensor Implementation |
| 351 | * Receiver: |
358 | * Receiver: |
| 352 | */ |
359 | */ |
| 353 | #define IR_PROTO_VIKING_STEAK (13) |
- | |
| 354 | #define IR_VIKING_STEAK_HIGH (700*CYCLES_PER_US/TIMER_PRESC) //us |
360 | #define IR_VIKING_STEAK_HIGH (700*CYCLES_PER_US/TIMER_PRESC) //us |
| 355 | #define IR_VIKING_STEAK_LOW_ONE (4000*CYCLES_PER_US/TIMER_PRESC) //us |
361 | #define IR_VIKING_STEAK_LOW_ONE (4000*CYCLES_PER_US/TIMER_PRESC) //us |
| 356 | #define IR_VIKING_STEAK_LOW_ZERO (1700*CYCLES_PER_US/TIMER_PRESC) //us |
362 | #define IR_VIKING_STEAK_LOW_ZERO (1700*CYCLES_PER_US/TIMER_PRESC) //us |
| 357 | #define IR_VIKING_STEAK_LOW_START (7800*CYCLES_PER_US/TIMER_PRESC) //us |
363 | #define IR_VIKING_STEAK_LOW_START (7800*CYCLES_PER_US/TIMER_PRESC) //us |
| 358 | #define IR_VIKING_STEAK_TIMEOUT (200) //ms BURST! (time between ir frames) |
364 | #define IR_VIKING_STEAK_TIMEOUT (200) //ms BURST! (time between ir frames) |
| Line 361... | Line 367... | ||
| 361 | #define IR_VIKING_STEAK_TOL_DIV (4) |
367 | #define IR_VIKING_STEAK_TOL_DIV (4) |
| 362 | 368 | ||
| 363 | /* Rubicson temperature sensor Implementation |
369 | /* Rubicson temperature sensor Implementation |
| 364 | * Receiver: |
370 | * Receiver: |
| 365 | */ |
371 | */ |
| 366 | #define IR_PROTO_RUBICSON (14) |
- | |
| 367 | #define IR_RUBICSON_HIGH (550*CYCLES_PER_US/TIMER_PRESC) //us |
372 | #define IR_RUBICSON_HIGH (550*CYCLES_PER_US/TIMER_PRESC) //us |
| 368 | #define IR_RUBICSON_LOW_ONE (1880*CYCLES_PER_US/TIMER_PRESC) //us |
373 | #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 |
374 | #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 |
375 | #define IR_RUBICSON_LOW_START (3850*CYCLES_PER_US/TIMER_PRESC) //us |
| 371 | #define IR_RUBICSON_TIMEOUT (200) //ms BURST! (time between ir frames) |
376 | #define IR_RUBICSON_TIMEOUT (200) //ms BURST! (time between ir frames) |