Path: blob/master/ALFA-W1F1/RTL8814AU/hal/efuse/rtl8814a/HalEfuseMask8814A_USB.c
1308 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#include <drv_types.h>1516#include "HalEfuseMask8814A_USB.h"1718/******************************************************************************19* MUSB.TXT20******************************************************************************/2122u8 Array_MP_8814A_MUSB[] = {230xFF,240xFF,250xFF,260xFF,270xFF,280xFF,290xFF,300xFF,310xFF,320xFF,330xFF,340xFF,350xFF,360x7F,370xFF,380xFF,390xFF,400x70,410xF4,420x00,430x00,440x00,450x00,460x00,470x00,480x00,490x00,500x00,510x00,520x00,530x00,540x00,5556};5758u16 EFUSE_GetArrayLen_MP_8814A_MUSB(void)59{60return sizeof(Array_MP_8814A_MUSB) / sizeof(u8);61}6263void EFUSE_GetMaskArray_MP_8814A_MUSB(u8 *Array)64{65u16 len = EFUSE_GetArrayLen_MP_8814A_MUSB(), i = 0;6667for (i = 0; i < len; ++i)68Array[i] = Array_MP_8814A_MUSB[i];69}7071BOOLEAN EFUSE_IsAddressMasked_MP_8814A_MUSB(u16 Offset)72{73int r = Offset / 16;74int c = (Offset % 16) / 2;75int result = 0;7677if (c < 4) /*Upper double word*/78result = (Array_MP_8814A_MUSB[r] & (0x10 << c));79else80result = (Array_MP_8814A_MUSB[r] & (0x01 << (c - 4)));8182return (result > 0) ? 0 : 1;83}848586