Welcome to the EyeBot  Version 7 - RPi1
A Controller For Various Hardware IO
Macros | Functions | Variables
irtv.h File Reference

Header file for the IRTV functions. More...

#include "spi.h"
#include <lirc/lirc_client.h>

Go to the source code of this file.

Macros

#define IR_KEY_1   '1'
 
#define IR_KEY_2   '2'
 
#define IR_KEY_3   '3'
 
#define IR_KEY_4   '4'
 
#define IR_KEY_5   '5'
 
#define IR_KEY_6   '6'
 
#define IR_KEY_7   '7'
 
#define IR_KEY_8   '8'
 
#define IR_KEY_9   '9'
 
#define IR_KEY_0   '0'
 
#define IR_KEY_RED   'R'
 
#define IR_KEY_GREEN   'G'
 
#define IR_KEY_YELLOW   'Y'
 
#define IR_KEY_BLUE   'B'
 
#define IR_KEY_LEFT   'L'
 
#define IR_KEY_RIGHT   '>'
 
#define IR_KEY_UP   'U'
 
#define IR_KEY_DOWN   'D'
 
#define IR_KEY_OK   'O'
 
#define IR_KEY_POWER   'P'
 

Functions

int IRTVInit (int semantics)
 Initializes the IR remote control decoder by calling IRTVInit() with the device name found in the corresponding HDT entry. More...
 
int IRTVGet (void)
 Waits for IR input and returns the keycode. More...
 
void IRTVRelease (void)
 Terminates the remote control decoder and releases the irtv thread.
 
int IRTVGetStatus (void)
 Checks to see if IR input is enabled;. More...
 
int IRTVGetControllerCode ()
 
void IRTVSetControllerCode (int semantics)
 
void IRTVSetHoldDelay (int delay)
 sets the hold to prevent multiple presses being registered when a IR remote button is pressed More...
 
void * IRTVInputThread (void *data)
 
int IRTVRead (void)
 
int IRTVFlush (void)
 

Variables

void * IRTVThread
 

Detailed Description

Header file for the IRTV functions.

Author
Remi KEAT & Marcus Pham

Function Documentation

int IRTVGet ( void  )

Waits for IR input and returns the keycode.

Returns
int retVal : Next code from the buffer

0 = no key

int IRTVGetStatus ( void  )

Checks to see if IR input is enabled;.

Returns
int retVal: whether IR input is enabled
-0: not enabled
-1: enabled
int IRTVInit ( int  semantics)

Initializes the IR remote control decoder by calling IRTVInit() with the device name found in the corresponding HDT entry.

Parameters
DeviceSemanticssemantics, for the IR remote this will be the controller code
Returns
int retVal :
  • 0 = ok
  • 1 = HDT file error
  • 2 = invalid or missing "IRTV" HDT entry for this semantics
  • 3 = unable to initialise IR input
void IRTVSetHoldDelay ( int  delay)

sets the hold to prevent multiple presses being registered when a IR remote button is pressed

Parameters
intdelay: the value to set the delay to, larger value equal larger delay