All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
IR NEC Remote receiver

Receives commands from NEC IR remotes More...

Detailed Description

Receives commands from NEC IR remotes

Files

file  ir_nec.h
 
file  ir_nec_constants.h
 Internal addresses, registers and constants.
 
file  ir_nec_params.h
 Default configuration.
 

Data Structures

struct  ir_nec_cmd_t
 NEC command structure. More...
 
struct  ir_nec_params_t
 Device initialization parameters. More...
 
struct  ir_nec_t
 Device descriptor for the driver. More...
 

Functions

int ir_nec_init (ir_nec_t *dev, const ir_nec_params_t *params)
 Initialize the given device.
 
int ir_nec_read (ir_nec_t *dev, ir_nec_cmd_t *command)
 Read a command packet.
 

Function Documentation

◆ ir_nec_init()

int ir_nec_init ( ir_nec_t * dev,
const ir_nec_params_t * params )

Initialize the given device.

Parameters
[in,out]devDevice descriptor of the driver
[in]paramsInitialization parameters
Returns
0 on success

◆ ir_nec_read()

int ir_nec_read ( ir_nec_t * dev,
ir_nec_cmd_t * command )

Read a command packet.

Blocks until one is received

Parameters
[in,out]devDevice descriptor of the driver
[out]commandStructure to write the result into
Return values
0Success
-1Isrpipe returned too few bytes. Should never happen