source: svn/newcon3bcm2_21bu/dst/app/src/Function/App_Fnc_Comm.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1
2
3#ifndef __APP_FNC_COMM_H__
4#define __APP_FNC_COMM_H__
5
6
7//micom°úÀÇ Åë½ÅÀ» À§ÇÑ ÇÁ·ÎÅäÄÝ
8
9#define MICOM_UART_START_CODE 0x2
10#define MICOM_UART_DATA_LEN 4
11#define MICOM_UART_MSG_LEN (MICOM_UART_DATA_LEN+2)
12        //start code(1)+cmd(1)+data
13
14typedef enum {
15        eCMD_READYTOSTART=0x10,
16        eCMD_WAKEUP_INFO=0x11,
17        eCMD_SET_IRVENDER=0x12,
18       
19        eCMD_SET_LED=0x13,
20        eCMD_INPUT_KEYPAD=0x14,
21        eCMD_INPUT_IR1=0x15,
22        eCMD_INPUT_IR2=0x16,
23       
24        eCMD_IAM_ALIVE=0x17,
25        eCMD_SET_STANDBY=0x18,
26       
27        eCMD_SET_STATUS=0x19,
28       
29        //for debugging.
30        eCMD_DEBUG=0x20,
31        eCMD_SET_DBG_LED, //led on for debugging.
32       
33        eCMD_PRIV_SMPS, //smps on/off if there is no micom.
34        eCMD_PRIV_POWER, //
35       
36} tMICOM_CMD;
37
38
39typedef enum {
40        ePOWER_ON_AC=0x0,
41        ePOWER_ON_KEY=0x1,
42        ePOWER_ON_TIMER=0x2,
43        ePOWER_ON_RESET=0x3
44} tMICOM_PowerOnSrc;
45
46
47typedef enum {
48        eKPD_NONE=0x0,
49        eKPD_POWER=0x1,
50       
51        eKPD_CH_UP=0x2,//up
52        eKPD_CH_DOWN=0x3,//down
53        eKPD_VOL_DOWN=0x4,//left
54        eKPD_VOL_UP=0x5,//right
55
56        eKPD_OK=0x6,
57        eKPD_MENU=0x8,
58       
59        eKPD_RELEASE=0xff
60} tMICOM_KpdKey;
61
62
63typedef enum {
64        eMICOM_MODE_S0=0x0,
65        eMICOM_MODE_S1=0x1,
66        eMICOM_MODE_S2=0x2,
67        eMICOM_MODE_S3=0x3
68} tMICOM_Mode;
69
70
71
72
73void App_Fnc_CommInit(void);
74        //commÀ» À§ÇÑ ÃʱâÈ­ ÇÔ¼ö
75
76void App_Fnc_SendData(UINT8 *msg, int size);
77        //comm¿¡ data¸¦ Àü¼ÛÇÔ.
78
79void App_Fnc_SendData2(UINT8 cmd, UINT8 d1, UINT8 d2, UINT8 d3, UINT8 d4);
80        //comm¿¡ data¸¦ Àü¼ÛÇÔ.
81       
82
83UINT8 *App_Fnc_ReceiveData(int start_code, int num_data, UINT32 ms_wait);
84        //ÇØ´ç ¼ýÀÚÀÇ data¸¦ ¹ÞÀ¸¸é ±× µ¥ÀÌÅ͸¦ ¸®ÅÏÇÔ.
85        //ÇØ´ç ¼ýÀÚÀÇ data°¡ ¼ö½ÅµÇÁö ¾ÊÀ¸¸é NULLÀ» ¸®ÅÏÇÔ.
86        //
87
88BOOL App_Fnc_ExistMicom(void);
89        //micomÀÌ ÀÖ´ÂÁö¸¦ È®ÀÎÇÔ.
90
91
92#endif /* __APP_FNC_COMM_H__ */
93
94/* end of file */
Note: See TracBrowser for help on using the repository browser.