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) 2006-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 apiSWI2C.h 98 /// @brief SWI2C interface 99 /// @author MStar Semiconductor Inc. 100 /// @version 1.0 101 ///////////////////////////////////////////////////////////////////////////////////////////////////// 102 103 /*! \defgroup G_PERIPHERAL Peripheral modules 104 \defgroup G_SWI2C SWI2C interface 105 \ingroup G_PERIPHERAL 106 107 \brief 108 109 IIC is a multi-master, multi-slave, single-ended, serial computer bus. It is typically used for attaching lower-speed peripheral 110 ICs to processors and micro-controllers. Alternatively I2C is spelled I2C (pronounced I-two-C) or IIC (pronounced I-I-C). 111 112 apiSWI2C using GPIOs(SDA and SCL) to emulate IIC protocol. 113 114 <b>Features</b> 115 - IIC Initialize & De-initialize function 116 - IIC Send Data 117 - IIC Receive Data 118 119 <b> Operation Code Flow: </b> \n 120 -# I2C Start Condition. 121 -# Send data. 122 -# Receive data. 123 -# I2C End Condition. 124 125 \defgroup G_SWI2C_INIT Initialization Task relative 126 \ingroup G_SWI2C 127 \defgroup G_SWI2C_COMMON read/write Task relative 128 \ingroup G_SWI2C 129 \defgroup G_SWI2C_BUS I2C Bus relative 130 \ingroup G_SWI2C 131 \defgroup G_SWI2C_OTHER other relative 132 \ingroup G_SWI2C 133 \defgroup G_SWI2C_ToBeModified SWI2C api to be modified 134 \ingroup G_SWI2C 135 \defgroup G_SWI2C_ToBeRemove SWI2C api to be removed 136 \ingroup G_SWI2C 137 */ 138 139 #ifndef _API_SWI2C_H_ 140 #define _API_SWI2C_H_ 141 142 #include "MsCommon.h" 143 144 #ifdef __cplusplus 145 extern "C" 146 { 147 #endif 148 149 //------------------------------------------------------------------------------------------------- 150 // Driver Capability 151 //------------------------------------------------------------------------------------------------- 152 153 154 //------------------------------------------------------------------------------------------------- 155 // Macro and Define 156 //------------------------------------------------------------------------------------------------- 157 /// define IR library version 158 #define MSIF_SWI2C_LIB_CODE {'S','I','2','C'} 159 #define MSIF_SWI2C_LIBVER {'0','5'} 160 #define MSIF_SWI2C_BUILDNUM {'0','5' } 161 #define MSIF_SWI2C_CHANGELIST {'0','0','4','9','7','5','7','8'} 162 163 #define SWI2C_API_VERSION /* Character String for DRV/API version */ \ 164 MSIF_TAG, /* 'MSIF' */ \ 165 MSIF_CLASS, /* '00' */ \ 166 MSIF_CUS, /* 0x0000 */ \ 167 MSIF_MOD, /* 0x0000 */ \ 168 MSIF_CHIP, \ 169 MSIF_CPU, \ 170 MSIF_SWI2C_LIB_CODE, /* IP__ */ \ 171 MSIF_SWI2C_LIBVER, /* 0.0 ~ Z.Z */ \ 172 MSIF_SWI2C_BUILDNUM, /* 00 ~ 99 */ \ 173 MSIF_SWI2C_CHANGELIST, /* CL# */ \ 174 MSIF_OS 175 176 // Speed Mapping: Base on the Driver loading, maybe you must to use the oscilloscope to measure this Value 177 // Speed Mapping has been refined, and you can specify the IIC speed X (KHz) driectly by X. 178 #define SWI2C_SPEED_MAPPING_400K 400 179 #define SWI2C_SPEED_MAPPING_350K 350 180 #define SWI2C_SPEED_MAPPING_300K 300 181 #define SWI2C_SPEED_MAPPING_250K 250 182 #define SWI2C_SPEED_MAPPING_200K 200 183 #define SWI2C_SPEED_MAPPING_150K 150 184 #define SWI2C_SPEED_MAPPING_100K 100 185 #define SWI2C_SPEED_MAPPING_50K 50 186 187 /// emurate SWI2C fucntion return result 188 typedef enum 189 { 190 /// SWI2C result for failure 191 E_SWI2C_FAIL =0, 192 /// SWI2C result for OK 193 E_SWI2C_OK = 1, 194 195 } SWI2C_Result; 196 197 ///Define SWI2C Bus Configuration 198 typedef struct 199 { 200 MS_U16 padSCL; 201 MS_U16 padSDA; 202 MS_U16 defDelay; 203 } SWI2C_BusCfg; 204 205 ///Define SWI2C read mode 206 typedef enum { 207 E_SWI2C_READ_MODE_DIRECT, ///< first transmit slave address + reg address and then start receive the data */ 208 E_SWI2C_READ_MODE_DIRECTION_CHANGE, ///< slave address + reg address in write mode, direction change to read mode, repeat start slave address in read mode, data from device 209 E_SWI2C_READ_MODE_DIRECTION_CHANGE_STOP_START, ///< slave address + reg address in write mode + stop, direction change to read mode, repeat start slave address in read mode, data from device 210 E_SWI2C_READ_MODE_MAX 211 } SWI2C_ReadMode; 212 213 ///Define SWI2C debug level 214 typedef enum _SWI2C_DbgLvl 215 { 216 E_SWI2C_DBGLVL_NONE = 0, /// no debug message 217 E_SWI2C_DBGLVL_WARNING, /// show warning only 218 E_SWI2C_DBGLVL_ERROR, /// show error only 219 E_SWI2C_DBGLVL_INFO, /// show error & informaiton 220 E_SWI2C_DBGLVL_ALL, /// show error, information & funciton name 221 }SWI2C_DbgLvl; 222 //------------------------------------------------------------------------------------------------- 223 /// MOBF Encrypt 224 /// @ingroup G_SWI2C_INIT 225 /// @param u32Key \b IN: Key 226 /// @param bEnable \b IN: TRUE/FLASE 227 /// @return DRVAESDMA_OK : Success 228 /// @return Others : Fail 229 //------------------------------------------------------------------------------------------------- 230 void MApi_SWI2C_Init(SWI2C_BusCfg SWI2CBusCfg[],MS_U8 u8CfgBusNum); 231 //------------------------------------------------------------------------------------------------- 232 /// MOBF Encrypt 233 /// @ingroup G_SWI2C_COMMON 234 /// @param u32Key \b IN: Key 235 /// @param bEnable \b IN: TRUE/FLASE 236 /// @return DRVAESDMA_OK : Success 237 /// @return Others : Fail 238 //------------------------------------------------------------------------------------------------- 239 MS_BOOL MApi_SWI2C_WriteBytes(MS_U16 u16BusNumSlaveID, MS_U8 u8addrcount, MS_U8* pu8addr, MS_U16 u16size, MS_U8* pu8data); 240 //------------------------------------------------------------------------------------------------- 241 /// MOBF Encrypt 242 /// @ingroup G_SWI2C_COMMON 243 /// @param u32Key \b IN: Key 244 /// @param bEnable \b IN: TRUE/FLASE 245 /// @return DRVAESDMA_OK : Success 246 /// @return Others : Fail 247 //------------------------------------------------------------------------------------------------- 248 MS_BOOL MApi_SWI2C_WriteBytesStop(MS_U16 u16BusNumSlaveID, MS_U8 AddrCnt, MS_U8* pu8addr, MS_U16 u16size, MS_U8* pBuf,MS_BOOL bGenStop); 249 //------------------------------------------------------------------------------------------------- 250 /// MOBF Encrypt 251 /// @ingroup G_SWI2C_COMMON 252 /// @param u32Key \b IN: Key 253 /// @param bEnable \b IN: TRUE/FLASE 254 /// @return DRVAESDMA_OK : Success 255 /// @return Others : Fail 256 //------------------------------------------------------------------------------------------------- 257 MS_BOOL MApi_SWI2C_ReadBytes(MS_U16 u16BusNumSlaveID, MS_U8 u8AddrNum, MS_U8* paddr, MS_U16 u16size, MS_U8* pu8data); 258 //------------------------------------------------------------------------------------------------- 259 /// MOBF Encrypt 260 /// @ingroup G_SWI2C_COMMON 261 /// @param u32Key \b IN: Key 262 /// @param bEnable \b IN: TRUE/FLASE 263 /// @return DRVAESDMA_OK : Success 264 /// @return Others : Fail 265 //------------------------------------------------------------------------------------------------- 266 MS_BOOL MApi_SWI2C_ReadBytes_ThruMode(MS_U16 u16BusNumSlaveID, MS_U8 ucSubAdr, MS_U8* paddr, MS_U16 ucBufLen, MS_U8* pBuf); 267 //------------------------------------------------------------------------------------------------- 268 /// MOBF Encrypt 269 /// @ingroup G_SWI2C_ToBeRemove 270 /// @param u32Key \b IN: Key 271 /// @param bEnable \b IN: TRUE/FLASE 272 /// @return DRVAESDMA_OK : Success 273 /// @return Others : Fail 274 //------------------------------------------------------------------------------------------------- 275 MS_BOOL MApi_SWI2C_ReadByte(MS_U16 u16BusNumSlaveID, MS_U8 u8RegAddr, MS_U8 *pu8Data); 276 //------------------------------------------------------------------------------------------------- 277 /// MOBF Encrypt 278 /// @ingroup G_SWI2C_ToBeRemove 279 /// @param u32Key \b IN: Key 280 /// @param bEnable \b IN: TRUE/FLASE 281 /// @return DRVAESDMA_OK : Success 282 /// @return Others : Fail 283 //------------------------------------------------------------------------------------------------- 284 MS_BOOL MApi_SWI2C_WriteByte(MS_U16 u16BusNumSlaveID, MS_U8 u8RegAddr, MS_U8 u8Data); 285 //------------------------------------------------------------------------------------------------- 286 /// MOBF Encrypt 287 /// @ingroup G_SWI2C_ToBeRemove 288 /// @param u32Key \b IN: Key 289 /// @param bEnable \b IN: TRUE/FLASE 290 /// @return DRVAESDMA_OK : Success 291 /// @return Others : Fail 292 //------------------------------------------------------------------------------------------------- 293 // MS_BOOL MApi_SWI2C_Write2Bytes(MS_U16 u16BusNumSlaveID, MS_U8 u8addr, MS_U16 u16data); 294 //------------------------------------------------------------------------------------------------- 295 /// MOBF Encrypt 296 /// @ingroup G_SWI2C_ToBeRemove 297 /// @param u32Key \b IN: Key 298 /// @param bEnable \b IN: TRUE/FLASE 299 /// @return DRVAESDMA_OK : Success 300 /// @return Others : Fail 301 //------------------------------------------------------------------------------------------------- 302 // MS_U16 MApi_SWI2C_Read2Bytes(MS_U16 u16BusNumSlaveID, MS_U8 u8addr); 303 //------------------------------------------------------------------------------------------------- 304 /// MOBF Encrypt 305 /// @ingroup G_SWI2C_ToBeRemove 306 /// @param u32Key \b IN: Key 307 /// @param bEnable \b IN: TRUE/FLASE 308 /// @return DRVAESDMA_OK : Success 309 /// @return Others : Fail 310 //------------------------------------------------------------------------------------------------- 311 // MS_BOOL MApi_SWI2C_Write4Bytes(MS_U16 u16BusNumSlaveID, MS_U32 u32Data, MS_U8 u8EndData); 312 //------------------------------------------------------------------------------------------------- 313 /// MOBF Encrypt 314 /// @ingroup G_SWI2C_ToBeRemove 315 /// @param u32Key \b IN: Key 316 /// @param bEnable \b IN: TRUE/FLASE 317 /// @return DRVAESDMA_OK : Success 318 /// @return Others : Fail 319 //------------------------------------------------------------------------------------------------- 320 // MS_BOOL MApi_SWI2C_ReadByteDirectly(MS_U16 u16BusNumSlaveID, MS_U8 * pu8Data); 321 //------------------------------------------------------------------------------------------------- 322 /// MOBF Encrypt 323 /// @ingroup G_SWI2C_ToBeRemove 324 /// @param u32Key \b IN: Key 325 /// @param bEnable \b IN: TRUE/FLASE 326 /// @return DRVAESDMA_OK : Success 327 /// @return Others : Fail 328 //------------------------------------------------------------------------------------------------- 329 // MS_BOOL MApi_SWI2C_WriteGroupBytes(MS_U16 u16BusNumSlaveID, MS_U8 u8SubGroup, MS_U16 u16Addr, MS_U16 u16Data); 330 //------------------------------------------------------------------------------------------------- 331 /// MOBF Encrypt 332 /// @ingroup G_SWI2C_ToBeRemove 333 /// @param u32Key \b IN: Key 334 /// @param bEnable \b IN: TRUE/FLASE 335 /// @return DRVAESDMA_OK : Success 336 /// @return Others : Fail 337 //------------------------------------------------------------------------------------------------- 338 // MS_U16 MApi_SWI2C_ReadGroupBytes(MS_U16 u16BusNumSlaveID, MS_U8 u8SubGroup, MS_U16 u16Addr); 339 //------------------------------------------------------------------------------------------------- 340 /// MOBF Encrypt 341 /// @ingroup G_SWI2C_BUS 342 /// @param u32Key \b IN: Key 343 /// @param bEnable \b IN: TRUE/FLASE 344 /// @return DRVAESDMA_OK : Success 345 /// @return Others : Fail 346 //------------------------------------------------------------------------------------------------- 347 // MS_U8 MApi_SWI2C_GetMaxBuses(void); 348 //------------------------------------------------------------------------------------------------- 349 /// MOBF Encrypt 350 /// @ingroup G_SWI2C_BUS 351 /// @param u32Key \b IN: Key 352 /// @param bEnable \b IN: TRUE/FLASE 353 /// @return DRVAESDMA_OK : Success 354 /// @return Others : Fail 355 //------------------------------------------------------------------------------------------------- 356 MS_U32 MApi_SWI2C_Speed_Setting(MS_U8 u8BusNum, MS_U32 u32Speed_K); 357 //------------------------------------------------------------------------------------------------- 358 /// MOBF Encrypt 359 /// @ingroup G_SWI2C_COMMON 360 /// @param u32Key \b IN: Key 361 /// @param bEnable \b IN: TRUE/FLASE 362 /// @return DRVAESDMA_OK : Success 363 /// @return Others : Fail 364 //------------------------------------------------------------------------------------------------- 365 // MS_BOOL MApi_SWI2C_SetReadMode(SWI2C_ReadMode eReadMode); 366 //------------------------------------------------------------------------------------------------- 367 /// MOBF Encrypt 368 /// @ingroup G_SWI2C_BUS 369 /// @param u32Key \b IN: Key 370 /// @param bEnable \b IN: TRUE/FLASE 371 /// @return DRVAESDMA_OK : Success 372 /// @return Others : Fail 373 //------------------------------------------------------------------------------------------------- 374 // MS_BOOL MApi_SWI2C_SetBusReadMode(MS_U8 u8BusNum, SWI2C_ReadMode eReadMode); 375 //------------------------------------------------------------------------------------------------- 376 /// MOBF Encrypt 377 /// @ingroup G_SWI2C_COMMON 378 /// @param u32Key \b IN: Key 379 /// @param bEnable \b IN: TRUE/FLASE 380 /// @return DRVAESDMA_OK : Success 381 /// @return Others : Fail 382 //------------------------------------------------------------------------------------------------- 383 // MS_BOOL MApi_SWI2C_GetLibVer(const MSIF_Version **ppVersion); 384 //------------------------------------------------------------------------------------------------- 385 /// MOBF Encrypt 386 /// @ingroup G_SWI2C_COMMON 387 /// @param u32Key \b IN: Key 388 /// @param bEnable \b IN: TRUE/FLASE 389 /// @return DRVAESDMA_OK : Success 390 /// @return Others : Fail 391 //------------------------------------------------------------------------------------------------- 392 // SWI2C_Result MApi_SWI2C_SetDbgLevel(SWI2C_DbgLvl eLevel); 393 //------------------------------------------------------------------------------------------------- 394 /// MOBF Encrypt 395 /// @ingroup G_SWI2C_COMMON 396 /// @param u32Key \b IN: Key 397 /// @param bEnable \b IN: TRUE/FLASE 398 /// @return DRVAESDMA_OK : Success 399 /// @return Others : Fail 400 //------------------------------------------------------------------------------------------------- 401 // MS_U16 MApi_SWI2C_SetPowerState(EN_POWER_MODE u16PowerState); 402 403 /******************************************************************************/ 404 /// 405 /// The following API functions are packed for special usage in ISP programming 406 /// 407 /******************************************************************************/ 408 //------------------------------------------------------------------------------------------------- 409 /// MOBF Encrypt 410 /// @ingroup G_SWI2C_COMMON 411 /// @param u32Key \b IN: Key 412 /// @param bEnable \b IN: TRUE/FLASE 413 /// @return DRVAESDMA_OK : Success 414 /// @return Others : Fail 415 //------------------------------------------------------------------------------------------------- 416 void MApi_SWI2C_MutexLock(void); 417 //------------------------------------------------------------------------------------------------- 418 /// MOBF Encrypt 419 /// @ingroup G_SWI2C_COMMON 420 /// @param u32Key \b IN: Key 421 /// @param bEnable \b IN: TRUE/FLASE 422 /// @return DRVAESDMA_OK : Success 423 /// @return Others : Fail 424 //------------------------------------------------------------------------------------------------- 425 void MApi_SWI2C_MutexUnlock(void); 426 //------------------------------------------------------------------------------------------------- 427 /// MOBF Encrypt 428 /// @ingroup G_SWI2C_BUS 429 /// @param u32Key \b IN: Key 430 /// @param bEnable \b IN: TRUE/FLASE 431 /// @return DRVAESDMA_OK : Success 432 /// @return Others : Fail 433 //------------------------------------------------------------------------------------------------- 434 void MApi_SWI2C_UseBus( MS_U8 u8BusChn ); 435 //------------------------------------------------------------------------------------------------- 436 /// MOBF Encrypt 437 /// @ingroup G_SWI2C_BUS 438 /// @param u32Key \b IN: Key 439 /// @param bEnable \b IN: TRUE/FLASE 440 /// @return DRVAESDMA_OK : Success 441 /// @return Others : Fail 442 //------------------------------------------------------------------------------------------------- 443 void MApi_SWI2C_UnuseBus(void); 444 //------------------------------------------------------------------------------------------------- 445 /// MOBF Encrypt 446 /// @ingroup G_SWI2C_COMMON 447 /// @param u32Key \b IN: Key 448 /// @param bEnable \b IN: TRUE/FLASE 449 /// @return DRVAESDMA_OK : Success 450 /// @return Others : Fail 451 //------------------------------------------------------------------------------------------------- 452 MS_BOOL MApi_SWI2C_AccessStart(MS_U8 u8SlaveID, MS_U8 trans_t); 453 //------------------------------------------------------------------------------------------------- 454 /// MOBF Encrypt 455 /// @ingroup G_SWI2C_COMMON 456 /// @param u32Key \b IN: Key 457 /// @param bEnable \b IN: TRUE/FLASE 458 /// @return DRVAESDMA_OK : Success 459 /// @return Others : Fail 460 //------------------------------------------------------------------------------------------------- 461 void MApi_SWI2C_Stop(void); 462 //------------------------------------------------------------------------------------------------- 463 /// MOBF Encrypt 464 /// @ingroup G_SWI2C_COMMON 465 /// @param u32Key \b IN: Key 466 /// @param bEnable \b IN: TRUE/FLASE 467 /// @return DRVAESDMA_OK : Success 468 /// @return Others : Fail 469 //------------------------------------------------------------------------------------------------- 470 // MS_BOOL MApi_SWI2C_Start(void); 471 //------------------------------------------------------------------------------------------------- 472 /// MOBF Encrypt 473 /// @ingroup G_SWI2C_COMMON 474 /// @param u32Key \b IN: Key 475 /// @param bEnable \b IN: TRUE/FLASE 476 /// @return DRVAESDMA_OK : Success 477 /// @return Others : Fail 478 //------------------------------------------------------------------------------------------------- 479 MS_BOOL MApi_SWI2C_SendByte(MS_U8 u8date); 480 //------------------------------------------------------------------------------------------------- 481 /// MOBF Encrypt 482 /// @ingroup G_SWI2C_COMMON 483 /// @param u32Key \b IN: Key 484 /// @param bEnable \b IN: TRUE/FLASE 485 /// @return DRVAESDMA_OK : Success 486 /// @return Others : Fail 487 //------------------------------------------------------------------------------------------------- 488 MS_U8 MApi_SWI2C_GetByte(MS_U16 u16Ack); 489 490 #ifdef __cplusplus 491 } 492 #endif 493 494 #endif // _API_SWI2C_H_ 495