| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2010, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: $ |
|---|
| 11 | * $brcm_Revision: $ |
|---|
| 12 | * $brcm_Date: $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: $ |
|---|
| 19 | * |
|---|
| 20 | ***************************************************************************/ |
|---|
| 21 | #ifndef BAPP_REMOTE_H__ |
|---|
| 22 | #define BAPP_REMOTE_H__ |
|---|
| 23 | |
|---|
| 24 | #include "bapp_types.h" |
|---|
| 25 | |
|---|
| 26 | /* Key code modifier stored in msb of event but this might not work for all protocols */ |
|---|
| 27 | |
|---|
| 28 | typedef enum ir_key_type_t |
|---|
| 29 | { |
|---|
| 30 | eKEY_DOWN = (int)0x80000000, |
|---|
| 31 | eKEY_UP = (int)0x40000000, |
|---|
| 32 | eKEY_CMD = (int)0x20000000 |
|---|
| 33 | }ir_key_type_t; |
|---|
| 34 | |
|---|
| 35 | typedef struct bapp_remote *bapp_remote_t; |
|---|
| 36 | |
|---|
| 37 | typedef struct bapp_remote_config_t |
|---|
| 38 | { |
|---|
| 39 | unsigned int user_io_id; /* used to select remote protocol(s) */ |
|---|
| 40 | bool use_rf4ce; /* process only rf4ce protocol */ |
|---|
| 41 | bool use_ir; |
|---|
| 42 | }bapp_remote_config_t; |
|---|
| 43 | |
|---|
| 44 | typedef struct bapp_event_t |
|---|
| 45 | { |
|---|
| 46 | unsigned int code; |
|---|
| 47 | }bapp_event_t; |
|---|
| 48 | |
|---|
| 49 | #ifdef __cplusplus |
|---|
| 50 | extern "C" { |
|---|
| 51 | #endif |
|---|
| 52 | |
|---|
| 53 | bapp_result_t bapp_remote_open( |
|---|
| 54 | bapp_remote_t *p_remote |
|---|
| 55 | ); |
|---|
| 56 | void bapp_remote_close( |
|---|
| 57 | bapp_remote_t handle |
|---|
| 58 | ); |
|---|
| 59 | |
|---|
| 60 | void bapp_remote_set_config( |
|---|
| 61 | bapp_remote_config_t *p_config |
|---|
| 62 | ); |
|---|
| 63 | void bapp_remote_get_config( |
|---|
| 64 | bapp_remote_config_t *p_config |
|---|
| 65 | ); |
|---|
| 66 | |
|---|
| 67 | bapp_result_t bapp_remote_get_event( |
|---|
| 68 | bapp_remote_t handle, |
|---|
| 69 | bapp_event_t *p_event /* [out] event from the user input device */ |
|---|
| 70 | ); |
|---|
| 71 | |
|---|
| 72 | #ifdef __cplusplus |
|---|
| 73 | } |
|---|
| 74 | #endif |
|---|
| 75 | |
|---|
| 76 | #endif /* BAPP_REMOTE_H__ */ |
|---|