1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file drvJPD.h 98 /// @brief JPD Driver Interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 #ifndef _DRV_JPD_H_ 103 #define _DRV_JPD_H_ 104 105 #include "jpeg_def.h" 106 107 108 #ifdef __cplusplus 109 extern "C" 110 { 111 #endif 112 113 //------------------------------------------------------------------------------------------------- 114 // Macro and Define 115 //------------------------------------------------------------------------------------------------- 116 #define MSIF_JPD_LIB_CODE {'J','P','D','_'} ///<Lib code 117 #define MSIF_JPD_LIBVER {'0','1'} ///<LIB version 118 #define MSIF_JPD_BUILDNUM {'0','2'} ///<Build Number 119 #define MSIF_JPD_CHANGELIST {'0','0','2','8','5','2','5','1'} ///<P4 ChangeList Number 120 121 122 //------------------------------------------------------------------------------ 123 /// @brief \b JPD_DRV_VERSION : JPEG Version 124 //------------------------------------------------------------------------------ 125 #define JPD_DRV_VERSION /* Character String for DRV/API version */ \ 126 MSIF_TAG, /* 'MSIF' */ \ 127 MSIF_CLASS, /* '00' */ \ 128 MSIF_CUS, /* 0x0000 */ \ 129 MSIF_MOD, /* 0x0000 */ \ 130 MSIF_CHIP, \ 131 MSIF_CPU, \ 132 MSIF_JPD_LIB_CODE, /* IP__ */ \ 133 MSIF_JPD_LIBVER, /* 0.0 ~ Z.Z */ \ 134 MSIF_JPD_BUILDNUM, /* 00 ~ 99 */ \ 135 MSIF_JPD_CHANGELIST, /* CL# */ \ 136 MSIF_OS 137 138 #if 0 139 #if defined (__aeon__) 140 #define AEON_NON_CACHE_MASK 0x80000000 141 #elif defined (MSOS_TYPE_LINUX) 142 #define AEON_NON_CACHE_MASK 0x0 143 #else 144 #define AEON_NON_CACHE_MASK 0xA0000000 145 #endif 146 #endif 147 148 #define JPD_BIT(_bit_) (1<<(_bit_)) 149 #define JPD_BITMASK(_bits_) (JPD_BIT(((1)?_bits_)+1)-JPD_BIT(((0)?_bits_))) 150 #define JPD_OFFSET(x) ((x)<<1) 151 152 /*****************Config Flag*********************/ 153 //S-Config 154 #if 1//defined(CHIP_T3) || defined(CHIP_T4) || defined(CHIP_T7) || defined(CHIP_JANUS) || defined(CHIP_U4) || defined(CHIP_T8) || defined(CHIP_T9) || defined(CHIP_J2) 155 #define JPD_PSAVE_EN JPD_BIT(14) 156 #endif 157 //#define JPD_SWRST_S4 JPD_BIT(12) // Eris 158 //#define JPD_SWRST_S4L JPD_BIT(13) // Titania 159 #define JPD_SWRST JPD_BIT(13) // T1/T2/T3 160 #define JPD_ROI_EN JPD_BIT(11) 161 #define JPD_SVLD JPD_BIT(10) 162 #define JPD_SUVQ JPD_BIT(9) 163 #define JPD_TBL_RDY JPD_BIT(8) 164 #define JPD_DEC_EN JPD_BIT(7) 165 #define JPD_RST_EN JPD_BIT(6) 166 #define JPD_UV JPD_BIT(3) 167 #define JPD_Y_VSF1 (0<<2) 168 #define JPD_Y_VSF2 JPD_BIT(2) 169 #define JPD_Y_HSF1 0x01 170 #define JPD_Y_HSF2 0x02 171 #define JPD_Y_HSF4 0x03 172 173 //M-Config 174 #define JPD_H_VLD JPD_BIT(1) 175 #define JPD_L_VLD JPD_BIT(0) 176 177 //**********************JPD Spare Reg, For ECO usage**********************// 178 //Enable Redundant stuffing byte X'FF' skipping. (T4,JANUS,T7,U4,T8,T9,...) 179 /* 180 [0]: 20091214_fix0: skipping of stuffing byte X'FF' preceding restart marker; 1: fix enabled, 0: fix disabled 181 [1]: 20091214_fix1: toleration of restart marker index dis-order; 1: fix enabled, 0: fix disabled 182 183 [3]: reg_20100303_last: fix the problem of jpd will not alert jd2mi_last after miu_reset; 1: enable, 0: disable 184 [4]: reg_20100303_last_power_save: fix the problem of jpd will not alert jd2mi_last in power saving mode; 1: enable, 0: disable 185 [5]: reg_20100325_last_done_z : fix the problem of last_done_z; 1: enable, 0: disable 186 [6]: reg_20101101 : fix the problem of output data lost when clk_miu is far slower than clk_jpd. 1: enable, 0: disable (A1~) 187 */ 188 #define JPD_RST_STUFF_BYTE_HANDLE JPD_BIT(0) | JPD_BIT(1) | JPD_BIT(3) | JPD_BIT(4) | JPD_BIT(5) | JPD_BIT(6) | JPD_BIT(7) 189 #if (JPD_SUPPORT_3_HUFFMAN_TABLE==true) 190 //Enable JPD 3 Huffman table support 191 #define JPD_3_HUFFMAN_TABLE_SUPPORT JPD_BIT(2) 192 #endif 193 //************************************************************************// 194 195 //------------------------------------------------------------------------------------------------- 196 // Type and Structure 197 //------------------------------------------------------------------------------------------------- 198 199 // Chip Define 200 typedef enum 201 { 202 E_MJPEG_MSTAR_CHIP_NONE = 0, 203 E_MJPEG_MSTAR_CHIP_U3, 204 E_MJPEG_MSTAR_CHIP_T3, 205 E_MJPEG_MSTAR_CHIP_T4, 206 E_MJPEG_MSTAR_CHIP_JANUS, 207 E_MJPEG_MSTAR_CHIP_U4, 208 E_MJPEG_MSTAR_CHIP_T8, 209 E_MJPEG_MSTAR_CHIP_T9, 210 E_MJPEG_MSTAR_CHIP_T13, 211 E_MJPEG_MSTAR_CHIP_A1, 212 E_MJPEG_MSTAR_CHIP_A6, 213 E_MJPEG_MSTAR_CHIP_A7, 214 E_MJPEG_MSTAR_CHIP_AMETHYST, 215 E_MJPEG_MSTAR_CHIP_EAGLE, 216 E_MJPEG_MSTAR_CHIP_J2, 217 E_MJPEG_MSTAR_CHIP_EMERALD, 218 E_MJPEG_MSTAR_CHIP_M12, 219 } MJPEG_MSTAR_CHIP_ID; 220 221 // JPD event 222 typedef enum 223 { 224 E_JPD_EVENT_DEC_DONE = 0x01 225 , E_JPD_EVENT_ECS_ERROR = 0x02 226 , E_JPD_EVENT_IS_ERROR = 0x04 227 , E_JPD_EVENT_RST_ERROR = 0x08 228 , E_JPD_EVENT_MRBL_DONE = 0x10 229 , E_JPD_EVENT_MRBH_DONE = 0x20 230 #if (JPD_SUPPORT_AUTO_PROTECT==true) 231 , E_JPD_EVENT_MWB_FULL = 0x40 232 #endif 233 , E_JPD_EVENT_ERROR_MASK = 0x0E 234 } JPD_Event; 235 236 237 // JPD Downscale Ratio 238 // Bellows are 1, 1/2, 1/4 and 1/8 in order 239 typedef enum 240 { 241 E_JPD_DOWNSCALE_ORG = 0x00 242 , E_JPD_DOWNSCALE_HALF = 0x01 243 , E_JPD_DOWNSCALE_FOURTH = 0x02 244 , E_JPD_DOWNSCALE_EIGHTH = 0x03 245 } JPD_DownScale; 246 247 // Mimic fwJPD_if.h 248 typedef enum 249 { 250 // Invalid cmd 251 E_MJPEG_CMD_INVALID = 0xffffffffUL, 252 253 E_MJPEG_CMD_GO = 0x00, // Start to show 254 E_MJPEG_CMD_SET_FRAME_BUFF_START_ADDR = 0x01, // Set frame buffer address 255 E_MJPEG_CMD_SET_FRAME_BUFF_UNIT_SIZE = 0x02, // Set frame buffer size 256 E_MJPEG_CMD_SET_FRAME_BUFF_TOTAL_NUM = 0x03, // Set total number of frame buffer 257 E_MJPEG_CMD_SET_FRAME_BUFF_IDX = 0x04, // Set frame buffer index 258 E_MJPEG_CMD_SET_FRAME_BUFF_IDX_READY = 0x05, // Set frame buffer index ready for display 259 E_MJPEG_CMD_SET_WIDTH = 0x06, // Set frame width 260 E_MJPEG_CMD_SET_HEIGHT = 0x07, // Set frame height 261 E_MJPEG_CMD_SET_PITCH = 0x08, // Set pitch 262 E_MJPEG_CMD_SET_FRAME_ID_L = 0x09, // Set frame ID_L 263 E_MJPEG_CMD_SET_FRAME_ID_H = 0x0A, // Set frame ID_H 264 E_MJPEG_CMD_SET_TIMESTAMP = 0x0B, // Set Time Stamp 265 E_MJPEG_CMD_SET_FRAMERATE = 0x0C, // Set FrameRate 266 E_MJPEG_CMD_SET_FRAMERATE_BASE = 0x0D, // Set FrameRate Base 267 E_MJPEG_CMD_SET_FRAME_BUFF_IDX_VALID = 0x0E, // Set frame buffer index available 268 E_MJPEG_CMD_SET_CHIP_ID = 0x0F, // Set frame buffer index available 269 270 E_MJPEG_CMD_PLAY = 0x20, // Play 271 E_MJPEG_CMD_PAUSE = 0x21, // Pause 272 E_MJPEG_CMD_RESUME = 0x22, // Resume 273 E_MJPEG_CMD_STEP_PLAY = 0x23, // Step play 274 E_MJPEG_CMD_SET_SPEED_TYPE = 0x24, // Set play speed type: default, fast, slow 275 E_MJPEG_CMD_SET_SPEED = 0x25, // Set play speed 276 E_MJPEG_CMD_FLUSH_DISP_QUEUE = 0X26, // Flush display queue 277 E_MJPEG_CMD_FREEZE_DISP = 0x27, // Freeze display 278 E_MJPEG_CMD_ENABLE_AVSYNC = 0x28, // Enable AV sync 279 E_MJPEG_CMD_SET_AVSYNC_DELAY = 0x29, // Set AV sync delay 280 E_MJPEG_CMD_SET_AVSYNC_TOLERENCE = 0x2A, // Set AV sync tolerence 281 E_MJPEG_CMD_SET_PTS_BASE = 0x2B, // Set PTS base 282 E_MJPEG_CMD_SET_STC_BASE = 0x2C, // Set STC base 283 E_MJPEG_CMD_SET_BLUE_SCREEN = 0x2D, // Set Blue Screen 284 285 E_MJPEG_CMD_GET_NEXT_FREE_FRAME_BUFF_IDX = 0x40, // Get next free frame buffer index 286 E_MJPEG_CMD_COMPENSATE_PTS = 0x41, // Ask firmware to compensate PTS 287 288 // Display Command Queue 289 E_MJPEG_CMD_ENABLE_DISP_CMD_QUEUE = 0x80, // Enable Display Command Queue 290 E_MJPEG_CMD_PUSH_DISP_CMD = 0x81, // Push Display Command 291 E_MJPEG_CMD_GET_DISP_CMD_Q_VACANCY = 0x82, // Check if the display command queue full or not 292 293 E_MJPEG_CMD_IS_STEP_PLAY_DONE = 0xFF, // 294 E_MJPEG_CMD_IS_DISP_FINISH = 0xFE, // 295 E_MJPEG_CMD_IS_PLAYING = 0xFC, // 296 E_MJPEG_CMD_IS_DISPLAY_QUEUE_FULL = 0xFB, // 297 E_MJPEG_CMD_IS_AVSYNC_ON = 0xFA, // 298 E_MJPEG_CMD_IS_REACH_AVSYNC = 0xF9, // 299 E_MJPEG_CMD_IS_FLUSH_DONE = 0xF8, // Check if flush done 300 301 } MJPEG_User_Cmd; 302 303 // JPD debug level enum 304 typedef enum 305 { 306 E_JPD_DEBUG_DRV_NONE = 0x0 307 , E_JPD_DEBUG_DRV_MSG = 0x02 308 , E_JPD_DEBUG_DRV_ERR = 0x08 309 } JPD_DrvDbgLevel; 310 311 typedef enum 312 { 313 E_JPD_FAILED = 0 314 , E_JPD_OK = 1 315 , E_JPD_INVALID_PARAM = 2 316 } JPD_Return; 317 318 // JPD Interrupt Register Function 319 typedef void (*JPD_IsrFuncCb)(void); 320 321 //------------------------------------------------------------------------------ 322 // Structure for buffer 323 typedef struct 324 { 325 MS_PHYADDR u32ThumbnailBufAddr; 326 MS_U32 u32ThumbnailBufSize; 327 MS_U32 u32ThumbnailBufOffset; 328 MS_PHYADDR u32MRCBufAddr; // MRC buffer address 329 MS_U32 u32MRCBufSize; // MRC buffer size 330 MS_U32 u32MRCBufOffset; // MRC access byte address offset in MRC buffer relative to MRC start address 331 MS_PHYADDR u32MWCBufAddr; // MWC buffer address 332 MS_U16 u16MWCBufLineNum; // MWC Line number 333 MS_BOOL bProgressive; 334 MS_BOOL bThumbnailAccessMode; 335 } JPD_BufCfg; 336 //------------------------------------------------------------------------------ 337 // Structure for Grpinf of Table IndirectAccess 338 typedef struct 339 { 340 MS_U8 *u8DcLumaSymbol; 341 MS_U16 *u16DcLumaCode; 342 MS_U8 *u8DcChromaSymbol; 343 MS_U16 *u16DcChromaCode; 344 MS_U8 *u8DcChroma2Symbol; 345 MS_U16 *u16DcChroma2Code; 346 MS_U8 *u8AcLumaSymbol; 347 MS_U16 *u16AcLumaCode; 348 MS_U8 *u8AcChromaSymbol; 349 MS_U16 *u16AcChromaCode; 350 MS_U8 *u8AcChroma2Symbol; 351 MS_U16 *u16AcChroma2Code; 352 MS_BOOL DHT; 353 MS_BOOL bUVHuffman; 354 } JPD_Grpinf; 355 //------------------------------------------------------------------------------ 356 // Structure for Symidx of Table Indirect Access 357 typedef struct 358 { 359 MS_U8 *u8DcLumaHuffVal; 360 MS_U8 *u8DcChromaHuffVal; 361 MS_U8 *u8DcChroma2HuffVal; 362 MS_U8 *u8AcLumaHuffVal; 363 MS_U8 *u8AcChromaHuffVal; 364 MS_U8 *u8AcChroma2HuffVal; 365 MS_BOOL DHT; 366 MS_BOOL bUVHuffman; 367 } JPD_Symidx; 368 //------------------------------------------------------------------------------ 369 // Structure for Quantization Table 370 typedef struct 371 { 372 MS_U16 s16Value[64]; 373 MS_BOOL bValid; 374 } JPD_QuanTbl; 375 //------------------------------------------------------------------------------ 376 // Structure for IQtbl of Table Indirect Access 377 typedef struct 378 { 379 MS_U8 *u8CompQuant; 380 JPD_QuanTbl *QuantTables; 381 MS_U8 u8CompNum; 382 MS_BOOL DQT; 383 } JPD_IQTbl; 384 //------------------------------------------------------------------------------ 385 // Structure for JPD capability 386 typedef struct 387 { 388 MS_BOOL bBaseline; 389 MS_BOOL bProgressive; 390 MS_BOOL bMJPEG; 391 } JPD_Cap; 392 //------------------------------------------------------------------------------ 393 // Structure for JPD Information 394 typedef struct 395 { 396 MS_U8* pu8HalVer; 397 MS_U8* pu8FwVer; 398 JPD_Cap stCap; 399 } JPD_Info; 400 //------------------------------------------------------------------------------ 401 // Structure for JPD Status 402 typedef struct 403 { 404 MS_U32 u32CurMRCAddr; 405 MS_U16 u16CurVidx; 406 MS_U16 u16CurRow; 407 MS_U16 u16CurCol; 408 MS_BOOL bIsBusy; 409 MS_BOOL bIsrEnable; 410 } JPD_Status; 411 412 //------------------------------------------------------------------------------------------------- 413 // Function and Variable 414 //------------------------------------------------------------------------------------------------- 415 //void MDrv_JPD_Initialize(MS_U8 u8ChipType); 416 void MDrv_JPD_InitBuf(JPD_BufCfg in); 417 //void MDrv_JPD_Reset(void); 418 //void MDrv_JPD_SW_Pause_Reset(void); 419 void MDrv_JPD_Rst(void); 420 void MDrv_JPD_Rst_SVLD(void); 421 //MS_U16 MDrv_JPD_GetSWResetMask(void); 422 //void MDrv_JPD_SetReadBuffer(MS_U32 u32BufAddr, MS_U32 u32BufSize); 423 //void MDrv_JPD_SetMRCStartAddr(MS_U32 u32ByteOffset); 424 //void MDrv_JPD_SetOutputFrameBuffer(MS_U32 u32BufAddr); 425 void MDrv_JPD_SetPicDimension(MS_U16 u16Width, MS_U16 u16Height); 426 //MS_U16 MDrv_JPD_ReadJPDStatus(void); 427 MS_U16 MDrv_JPD_GetEventFlag(void); 428 //void MDrv_JPD_ClearJPDStatus(MS_U16 status_bit); 429 void MDrv_JPD_SetEventFlag(MS_U16 u16Value); 430 void MDrv_JPD_SetROI(MS_U16 start_x, MS_U16 start_y, MS_U16 width, MS_U16 height); 431 //void MDrv_JPD_SetClock(MS_U8 on); 432 void MDrv_JPD_PowerOn(void); 433 void MDrv_JPD_PowerOff(void); 434 #if 0 // unused function 435 MS_U32 MDrv_JPD_ReadCurrentMRCAddr(void); 436 #endif 437 void MDrv_JPD_SetRSTIntv(MS_U16 u16Value); 438 MS_U16 MDrv_JPD_GetCurVidx(void); 439 440 void MDrv_JPD_WriteGrpinf(JPD_Grpinf in); 441 void MDrv_JPD_WriteSymidx(JPD_Symidx in); 442 void MDrv_JPD_WriteIQTbl(JPD_IQTbl in); 443 444 void MDrv_JPD_Set_M_Config(MS_U16 u16Value); 445 MS_U16 MDrv_JPD_Get_M_Config(void); 446 void MDrv_JPD_Set_S_Config(MS_U16 u16Value); 447 MS_U16 MDrv_JPD_Get_S_Config(void); 448 void MDrv_JPD_SetDbgLevel(MS_U8 u8DbgLevel); 449 void MDrv_JPD_GetInfo(JPD_Info *pJPD_Info); 450 JPD_Status* MDrv_JPD_GetStatus(void); 451 MS_BOOL MDrv_JPD_GetLibVer(const MSIF_Version **ppVersion); 452 453 MS_BOOL MDrv_JPD_EnableISR(JPD_IsrFuncCb IsrCb); 454 MS_BOOL MDrv_JPD_DisableISR(void); 455 456 MS_U32 MDrv_JPD_GetCurMRCAddr(void); 457 MS_U16 MDrv_JPD_GetCurRow(void); 458 MS_U16 MDrv_JPD_GetCurCol(void); 459 460 #if (JPD_SUPPORT_AUTO_PROTECT==true) 461 void MDrv_JPD_SetAutoProtect(MS_BOOL enable); 462 void MDrv_JPD_SetWPENEndAddr(MS_PHYADDR u32ByteOffset); 463 #else 464 #if 1//defined(CHIP_T3) || defined(CHIP_T4) || defined(CHIP_T7) || defined(CHIP_JANUS) || defined(CHIP_U4) || defined(CHIP_T8) || defined(CHIP_T9) || defined(CHIP_J2) 465 void MDrv_JPD_SetWriteProtect(MS_BOOL enable); 466 #endif 467 #endif 468 469 void MDrv_JPD_SetSpare(MS_U16 u16Value); 470 MS_U16 MDrv_JPD_GetSpare(void); 471 void MDrv_JPD_PrintGTable(void); 472 void MDrv_JPD_PrintHTable(void); 473 void MDrv_JPD_PrintQTable(void); 474 void MDrv_JPD_Debug(void); 475 476 477 #ifdef __cplusplus 478 } 479 #endif 480 481 #endif // _DRV_JPD_H_ 482 483