1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2012 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (??MStar Confidential Information??) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
////////////////////////////////////////////////////////////////////////////////
/**
*
* @file mstar_drv_ic_fw_porting_layer.c
*
* @brief This file defines the interface of touch screen
*
* @version v2.2.0.0
*
*/
/*=============================================================*/
// INCLUDE FILE
/*=============================================================*/
#include "mstar_drv_ic_fw_porting_layer.h"
/*=============================================================*/
// EXTERN VARIABLE DECLARATION
/*=============================================================*/
#ifdef CONFIG_ENABLE_GESTURE_WAKEUP
extern u16 g_GestureWakeupMode;
extern u8 g_GestureWakeupFlag;
#endif //CONFIG_ENABLE_GESTURE_WAKEUP
/*=============================================================*/
// GLOBAL FUNCTION DEFINITION
/*=============================================================*/
u8 DrvIcFwLyrGetChipType(void)
{
// DBG("*** %s() ***\n", __func__);
return DrvFwCtrlGetChipType();
}
void DrvIcFwLyrGetCustomerFirmwareVersion(u16 *pMajor, u16 *pMinor, u8 **ppVersion)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlGetCustomerFirmwareVersion(pMajor, pMinor, ppVersion);
}
void DrvIcFwLyrGetPlatformFirmwareVersion(u8 **ppVersion)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlGetPlatformFirmwareVersion(ppVersion);
}
s32 DrvIcFwLyrUpdateFirmware(u8 szFwData[][1024], EmemType_e eEmemType)
{
// DBG("*** %s() ***\n", __func__);
return DrvFwCtrlUpdateFirmware(szFwData, eEmemType);
}
u32 DrvIcFwLyrIsRegisterFingerTouchInterruptHandler(void)
{
DBG("*** %s() ***\n", __func__);
return 1; // Indicate that it is necessary to register interrupt handler with GPIO INT pin when firmware is running on IC
}
void DrvIcFwLyrHandleFingerTouch(u8 *pPacket, u16 nLength)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlHandleFingerTouch();
}
//------------------------------------------------------------------------------//
#ifdef CONFIG_ENABLE_GESTURE_WAKEUP
void DrvIcFwLyrOpenGestureWakeup(u16 nWakeupMode)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlOpenGestureWakeup(nWakeupMode);
}
void DrvIcFwLyrCloseGestureWakeup(void)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlCloseGestureWakeup();
}
#endif //CONFIG_ENABLE_GESTURE_WAKEUP
//------------------------------------------------------------------------------//
#ifdef CONFIG_ENABLE_FIRMWARE_DATA_LOG
#if defined(CONFIG_ENABLE_CHIP_MSG26XXM)
u16 DrvIcFwLyrGetFirmwareMode(void)
{
// DBG("*** %s() ***\n", __func__);
return DrvFwCtrlGetFirmwareMode();
}
#endif //CONFIG_ENABLE_CHIP_MSG26XXM
u16 DrvIcFwLyrChangeFirmwareMode(u16 nMode)
{
// DBG("*** %s() ***\n", __func__);
return DrvFwCtrlChangeFirmwareMode(nMode);
}
void DrvIcFwLyrGetFirmwareInfo(FirmwareInfo_t *pInfo)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlGetFirmwareInfo(pInfo);
}
void DrvIcFwLyrRestoreFirmwareModeToLogDataMode(void)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlRestoreFirmwareModeToLogDataMode();
}
#endif //CONFIG_ENABLE_FIRMWARE_DATA_LOG
//------------------------------------------------------------------------------//
#ifdef CONFIG_UPDATE_FIRMWARE_BY_SW_ID
void DrvIcFwLyrCheckFirmwareUpdateBySwId(void)
{
// DBG("*** %s() ***\n", __func__);
DrvFwCtrlCheckFirmwareUpdateBySwId();
}
#endif //CONFIG_UPDATE_FIRMWARE_BY_SW_ID
//------------------------------------------------------------------------------//
#ifdef CONFIG_ENABLE_ITO_MP_TEST
void DrvIcFwLyrCreateMpTestWorkQueue(void)
{
// DBG("*** %s() ***\n", __func__);
DrvMpTestCreateMpTestWorkQueue();
}
void DrvIcFwLyrScheduleMpTestWork(ItoTestMode_e eItoTestMode)
{
// DBG("*** %s() ***\n", __func__);
DrvMpTestScheduleMpTestWork(eItoTestMode);
}
s32 DrvIcFwLyrGetMpTestResult(void)
{
// DBG("*** %s() ***\n", __func__);
return DrvMpTestGetTestResult();
}
void DrvIcFwLyrGetMpTestFailChannel(ItoTestMode_e eItoTestMode, u8 *pFailChannel, u32 *pFailChannelCount)
{
// DBG("*** %s() ***\n", __func__);
return DrvMpTestGetTestFailChannel(eItoTestMode, pFailChannel, pFailChannelCount);
}
void DrvIcFwLyrGetMpTestDataLog(ItoTestMode_e eItoTestMode, u8 *pDataLog, u32 *pLength)
{
// DBG("*** %s() ***\n", __func__);
return DrvMpTestGetTestDataLog(eItoTestMode, pDataLog, pLength);
}
#endif //CONFIG_ENABLE_ITO_MP_TEST
|