irblast.h File Reference

Go to the source code of this file.

Defines

#define IRBLAST_SETFREQ   0x0A01
 Set carrier freq.
#define IRBLAST_GETFREQ   0x0A02
 Query carrier freq.

Functions

u_char IrblastFreq2Ocr (u_char freqKHz)
 Converts carrier frequency in form of kHz to the timer OCR form.
int IrblastPeriod2Ocr (u_char freqKHz, int entries, u_short *pCode)
 Converts ircode from carrier frequency periods form to the timer OCR form.

Variables

NUTDEVICE devIrblast0


Define Documentation

#define IRBLAST_SETFREQ   0x0A01

Set carrier freq.

Definition at line 44 of file irblast.h.

#define IRBLAST_GETFREQ   0x0A02

Query carrier freq.

Definition at line 45 of file irblast.h.


Function Documentation

u_char IrblastFreq2Ocr ( u_char  freqKHz  ) 

Converts carrier frequency in form of kHz to the timer OCR form.

Parameters:
freqKHz frequency in kHz, range 30-50.
Returns:
OCR form of the frequency used by the driver or 0.

Definition at line 112 of file irblast.c.

References NutGetCpuClock().

int IrblastPeriod2Ocr ( u_char  freqKHz,
int  entries,
u_short pCode 
)

Converts ircode from carrier frequency periods form to the timer OCR form.

Given array of ir code in form of carrier frequency periods will be converted (in place) to the form of OCR periods used by the driver.

Parameters:
freqKHz frequency in kHz, range 30-50, for 0 pulse time =10us will be used
entries ir code length.
pCode pointer to the array with ir code, each entry in range 1-999.
Returns:
number of entries properly converted or -1 on error.

Definition at line 137 of file irblast.c.

References NutGetCpuClock().


Variable Documentation

Definition at line 487 of file irblast.c.


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/