source: svn/trunk/newcon3bcm2_21bu/dta/src/settop_api/bsettop_user_io.h

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 3.0 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2003-2006, 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 
22#ifndef BSETTOP_USER_IO_H__
23#define BSETTOP_USER_IO_H__
24
25#include "bsettop_types.h"
26
27
28#ifdef __cplusplus
29extern "C"
30{
31#endif
32
33/*=*********************
34Control user input and output, including:
35
36o LED's, including 7-segment LED's
37o Remote controls
38o Front panel
39o IR keyboards
40
41The key codes are passed through unmodified in a 32-bit structure.
42***********************/
43
44/* User Input API */
45
46/*
47Summary:
48        Open a user input object for receiving IR remote and keypad input.
49Description:
50        For now, the following id's are used:
51        0 - remote a
52        1 - remote b
53        2 - 56 MHz Sejin IR Keyboard
54        3 - keypad
55*/
56buser_input_t buser_input_open(
57                     bobject_t user_input_id /* user input object id */
58                    );
59
60/*
61Summary:
62        Close a user input handle.
63Description:
64        Releases all resources associated with the user input object
65*/
66void buser_input_close(
67        buser_input_t ui /* user input object */
68    );
69
70/*
71Summary:
72Representation of a user event.
73Description:
74The actual protocol for each input device is different. But they all
75fit into the same storage space.
76*/
77typedef struct buser_input_event {
78    uint32_t code;              /* One event is always contained in 32 bits of information */
79} buser_input_event;
80
81
82/*
83Summary:
84Read events from a user input device.
85
86Description:
87Because this function does not return a void* to raw data, but an array of structures,
88it is not called buser_input_read.
89*/
90bresult buser_input_get_event(
91        buser_input_t ui, /* user input object */
92        buser_input_event *event, /* [out,size_is(nevents)] event from the user */
93        unsigned nevents, /* number of entries in the event array */
94        unsigned *result_nevents /* [out] number of entries read */
95        );
96/*
97Summary:
98Maps physical input code to the internal code used in the higher level software. 
99Returns 0xFF for invalid code or the internal system key codes.  See bapp.h
100*/
101unsigned int buser_input_map_code(
102                                                                unsigned int code /* input code */
103                                                                );
104
105void buser_input_sim_key(uint32_t code);
106
107
108typedef enum button_t
109{
110    eButton_000 = 0x000,
111    eButton_00P= 0x001,
112    eButton_0U0= 0x010,
113    eButton_0UP= 0x011,
114    eButton_D00= 0x100,
115    eButton_D0P= 0x101,
116    eButton_DU0= 0x110,
117    eButton_DUP= 0x111,
118}button_t;
119
120int AOV_buser_input_GetButtonfactory(void);
121void aov_Set_Button_CHUpDown(unsigned int  keyIn);
122
123#ifdef __cplusplus
124}
125#endif
126
127
128#endif /* BSETTOP_USER_IO_H__ */
129
Note: See TracBrowser for help on using the repository browser.