irrx/irrx.h File Reference

#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)


Detailed Description

_ _ ____ ____ ___ ____ _ | | | / ___|| __ ) |_ _|_ __ | _ \ ___ _ __ ___ ___ | |_ ___ | | | \| _ \ | || '__| | |_) / _ \ '_ ` _ \ / _ \| __/ _ \ | |_| |___) | |_) | | || | | _ < __/ | | | | | (_) | || __/ /|____/|____/ |___|_| |_| |_| |_| |_|/ |

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 Documentation

#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 Documentation

typedef uint16_t irrx_code_t

Ir code received

Definition at line 34 of file irrx.h.


Function Documentation

irrx_code_t irrx_getcode ( void   ) 

Get received ir code Ircode Ir code received

Return values:
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().

00397 {
00398   IRRX_INIT_PORTS();
00399   IRRX_POWER_OFF();
00400 }

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 } 


Generated on Fri Oct 30 20:43:20 2009 for USB IR HID Device by  doxygen 1.5.8