#include <inttypes.h>
Go to the source code of this file.
Defines | |
#define | IRRX_NO_CODE (0) |
No code received. | |
Typedefs | |
typedef uint16_t | irrx_code_t |
Functions | |
irrx_code_t | irrx_getcode (void) |
void | irrx_init (void) |
void | irrx_power_on (void) |
void | irrx_power_off (void) |
Copyright 2007 J�rgen Birkler jorgen.birkler@gmail.com USB HID device for IR receiver License: GNU GPL v2 (see License.txt) or proprietary (contact author) * Bit length IR receiver (Suitable for Panasonic remotes)
Copyright 2006 J�rgen Birkler mailto:jorgen.birkler@gmail.com
Definition in file irrx.h.
#define IRRX_NO_CODE (0) |
No code received.
Definition at line 38 of file irrx.h.
Referenced by irrx_power_off(), irrx_power_on(), ISR(), and main().
typedef uint16_t irrx_code_t |
irrx_code_t irrx_getcode | ( | void | ) |
Get received ir code Ircode Ir code received
IRRX_NO_CODE | if not ir code received |
Definition at line 418 of file irrx_bitlength.c.
Referenced by main().
00419 { 00420 irrx_code_t result; 00421 TIMER1_CRITICAL_SECTION_ENTER() 00422 result = irrx_receivebuffer; 00423 TIMER1_CRITICAL_SECTION_EXIT() 00424 return result; 00425 }
void irrx_init | ( | void | ) |
Initialize hardware ports for ir receiver. Call once during reset
Definition at line 396 of file irrx_bitlength.c.
Referenced by main().
void irrx_power_off | ( | void | ) |
Disables power to the ir receiver and disables interrupts
Definition at line 412 of file irrx_bitlength.c.
00413 { 00414 irrx_receivebuffer = IRRX_NO_CODE; 00415 IRRX_POWER_OFF(); 00416 }
void irrx_power_on | ( | void | ) |
Start reception of ir codes by giving power to ir receiver and init timers and interrupts
Definition at line 402 of file irrx_bitlength.c.
Referenced by main().
00403 { 00404 irrx_internal.bitcount = irrx_bitcount_init; 00405 irrx_receivebuffer = IRRX_NO_CODE; 00406 IRRX_POWER_ON(); 00407 IRRX_TIMER1_START(); 00408 IRRX_TIMER1_ENABLE_INTERRUPTS(); 00409 IRRX_TIMER1_ENABLE_ICP_FALLING_EDGE(); 00410 }