Nut/OS  4.10.3
API Reference
irblast.h File Reference
#include <stdint.h>
Include dependency graph for irblast.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

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

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

Define Documentation

#define IRBLAST_SETFREQ   0x0A01

Set carrier freq.

Definition at line 49 of file irblast.h.

#define IRBLAST_GETFREQ   0x0A02

Query carrier freq.

Definition at line 50 of file irblast.h.


Function Documentation

uint8_t IrblastFreq2Ocr ( uint8_t  freqKHz)

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

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

Definition at line 119 of file irblast.c.

References NutGetCpuClock().

Here is the call graph for this function:

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:
freqKHzfrequency in kHz, range 30-50, for 0 pulse time =10us will be used
entriesir code length.
pCodepointer 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 144 of file irblast.c.

References NutGetCpuClock().

Here is the call graph for this function:


Variable Documentation

Definition at line 494 of file irblast.c.