IR Manager HAL 0.2.1
 
Loading...
Searching...
No Matches
PLAT_IR_API
Collaboration diagram for PLAT_IR_API:

Files

file  plat_ir.h
 IR HAL header.
 

Data Structures

struct  PLAT_irKey_metadata
 IR Key struct to store the IR key meta data. More...
 

Typedefs

typedef enum PLAT_xmp_tag PLAT_xmp_tag_t
 xmp tag type. This is used to specify the different remote types
 
typedef enum PLAT_xmp_owner PLAT_xmp_owner_t
 xmp owner type describes whether key received in pairing or normal mode
 
typedef struct PLAT_irKey_metadata PLAT_irKey_metadata_t
 IR Key struct to store the IR key meta data.
 
typedef void(* PLAT_IrKeyCallback_Extended_t) (PLAT_irKey_metadata_t *irKey)
 HAL must call this function when an extended IR key is received.
 
typedef void(* PLAT_IrKeyCallback_t) (int keyType, int keyCode)
 HAL must call this function when an IR key is received.
 

Enumerations

enum  PLAT_xmp_tag {
  XMP_TAG_COMCAST = 0x00 , XMP_TAG_PLATCO = 0x01 , XMP_TAG_XR11V2 = 0x02 , XMP_TAG_XR15V1 = 0x03 ,
  XMP_TAG_XR15V2 = 0x04 , XMP_TAG_XR16V1 = 0x05 , XMP_TAG_XRAV1 = 0x06 , XMP_TAG_XR20V1 = 0x07 ,
  XMP_TAG_PLATCOV2 = 0x08 , XMP_TAG_UNDEFINED
}
 xmp tag type. This is used to specify the different remote types More...
 
enum  PLAT_xmp_owner { XMP_OWNER_NORMAL = 0x00 , XMP_OWNER_PAIRING = 0x01 , XMP_OWNER_UNDEFINED }
 xmp owner type describes whether key received in pairing or normal mode More...
 

Functions

void PLAT_API_RegisterIRKeyCallbackExtended (PLAT_IrKeyCallback_Extended_t func)
 This function is used to register for Extended IR key events.
 
void PLAT_API_RegisterIRKeyCallback (PLAT_IrKeyCallback_t func)
 This function is used to register for IR key events.
 
int PLAT_API_INIT (void)
 This API initializes the underlying IR module.
 
void PLAT_API_TERM (void)
 This API is used to terminate the IR device module.
 
void PLAT_API_LOOP ()
 This function executes the key event loop.
 

Detailed Description

Typedef Documentation

◆ PLAT_irKey_metadata_t

IR Key struct to store the IR key meta data.

◆ PLAT_IrKeyCallback_Extended_t

typedef void(* PLAT_IrKeyCallback_Extended_t) (PLAT_irKey_metadata_t *irKey)

HAL must call this function when an extended IR key is received.

The Event meta data contains Key Type, Code, Owner, and Tag of the IR key pressed

Parameters
[in]irKeycontains data on IR key pressed. See PLAT_irKey_metadata_t
Returns
None
Note
This function must not suspend and must not invoke any blocking system calls. It shall send a message to a HAL IR event handler task.

◆ PLAT_IrKeyCallback_t

typedef void(* PLAT_IrKeyCallback_t) (int keyType, int keyCode)

HAL must call this function when an IR key is received.

The Event Data contains Key Type and Key Code of the IR key pressed

Parameters
[in]keyTypeKey Type (e.g. Key Down, Key Up, Key Repeat) of the IR key pressed. Platform specific. See macros KET_KEYDOWN, KET_KEYUP, KET_KEYREPEAT etc
[in]keyCodeKey Code of the the IR key. Platform specific. See macros KED_POWER, KED_SELECT, KED_CHANNELUP etc
Returns
None
Note
This function must not suspend and must not invoke any blocking system calls. It shall send a message to a HAL IR event handler task.

◆ PLAT_xmp_owner_t

xmp owner type describes whether key received in pairing or normal mode

◆ PLAT_xmp_tag_t

xmp tag type. This is used to specify the different remote types

Enumeration Type Documentation

◆ PLAT_xmp_owner

xmp owner type describes whether key received in pairing or normal mode

Enumerator
XMP_OWNER_NORMAL 

normal mode

XMP_OWNER_PAIRING 

paring mode

XMP_OWNER_UNDEFINED 

undefined mode

◆ PLAT_xmp_tag

xmp tag type. This is used to specify the different remote types

Enumerator
XMP_TAG_COMCAST 

comcast remote

XMP_TAG_PLATCO 

platco remote

XMP_TAG_XR11V2 

XR11V2 remote.

XMP_TAG_XR15V1 

XR15V1 remote.

XMP_TAG_XR15V2 

XR15V2 remote.

XMP_TAG_XR16V1 

XR16V1 remote.

XMP_TAG_XRAV1 

XRAV1 remote.

XMP_TAG_XR20V1 

XR20V1 remote.

XMP_TAG_PLATCOV2 

PLATCOV2 remote.

XMP_TAG_UNDEFINED 

Undefined.

Function Documentation

◆ PLAT_API_INIT()

int PLAT_API_INIT ( void )

This API initializes the underlying IR module.

This function must initialize all the IR specific user input device modules

Returns
int - Status
Return values
0- Success
1- Failure
Warning
This API is NOT thread safe. Caller shall handle the concurrency
See also
PLAT_API_TERM()

◆ PLAT_API_LOOP()

void PLAT_API_LOOP ( )

This function executes the key event loop.

This function executes the platform-specific key event loop. This will generally translate between platform-specific key codes and Comcast standard keycode definitions

Precondition
PLAT_API_INIT() should be called before calling this API
Warning
This API is NOT thread safe. Caller shall handle the concurrency

◆ PLAT_API_RegisterIRKeyCallback()

void PLAT_API_RegisterIRKeyCallback ( PLAT_IrKeyCallback_t func)

This function is used to register for IR key events.

The Caller must be notified with the IR Key events using the callback function

Parameters
[in]func- callback function ;
See also
PLAT_IrKeyCallback_t
Precondition
PLAT_API_INIT() should be called before calling this API
Warning
This API is NOT thread safe. Caller shall handle the concurrency
See also
PLAT_API_INIT()

◆ PLAT_API_RegisterIRKeyCallbackExtended()

void PLAT_API_RegisterIRKeyCallbackExtended ( PLAT_IrKeyCallback_Extended_t func)

This function is used to register for Extended IR key events.

The Caller must be notified with the extended IR Key events using the callback function

Parameters
[in]funccallback function. See PLAT_IrKeyCallback_Extended_t
Precondition
PLAT_API_INIT() should be called before calling this API
Warning
This API is NOT thread safe. Caller shall handle the concurrency.
See also
PLAT_API_INIT()

◆ PLAT_API_TERM()

void PLAT_API_TERM ( void )

This API is used to terminate the IR device module.

This function must terminate all the IR specific user input device modules. It must reset any data structures used within IR module and release any IR specific handles and resources

Precondition
PLAT_API_INIT() should be called before calling this API
Warning
This API is NOT thread safe. Caller shall handle the concurrency
See also
PLAT_API_INIT()