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

Defines IRTV functions. More...

#include "irtv.h"

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...
 
void * IRTVInputThread (void *data)
 
int IRTVGet (void)
 Waits for IR input and returns the keycode. More...
 
int IRTVRead (void)
 
void IRTVRelease (void)
 Terminates the remote control decoder and releases the irtv thread.
 
int IRTVFlush (void)
 
int IRTVGetStatus ()
 Checks to see if IR input is enabled;. More...
 
void IRTVSetControllerCode (int semantics)
 
int IRTVGetControllerCode ()
 
void IRTVSetHoldDelay (int delay)
 sets the hold to prevent multiple presses being registered when a IR remote button is pressed More...
 

Variables

int controllerCode
 
int running = 0
 
int holdDelay = 5
 

Detailed Description

Defines IRTV functions.

Author
Remi KEAT Currently under construction by Marcus Pham to initialise thread to handle IRTV keypresses on initialisation

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