irblast.c File Reference

Go to the source code of this file.

Typedefs

typedef struct _IRBLASTDCB IRBLASTDCB

Functions

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

Variables

NUTDEVICE devIrblast0


Typedef Documentation

typedef struct _IRBLASTDCB IRBLASTDCB

Definition at line 87 of file irblast.c.


Function Documentation

uint8_t IrblastFreq2Ocr ( uint8_t  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 115 of file irblast.c.

References NutGetCpuClock().

int IrblastPeriod2Ocr ( uint8_t  freqKHz,
int  entries,
uint16_t 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 140 of file irblast.c.

References NutGetCpuClock().


Variable Documentation

Initial value:

 {
    0,                          
    {'i', 'r', 'b', 'l', 'a', 's', 't', '0', 0}
    ,                           
    IFTYP_STREAM,               
    0,                          
    0,                          
    0,                          
    &dcb_pwm0,                  
    IrblastInit,
    IrblastIOCtl,
    0,
    IrblastWrite,
    IrblastWrite_P,
    IrblastOpen,
    IrblastClose,
    0
}

Definition at line 490 of file irblast.c.


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