91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 135KB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-03
  • 語言: 其他
  • 標簽: ftl??

資源簡介

該1代碼可以使用,只需配置參數和添加底層接口,我找了好久才找到的。

資源截圖

代碼片段和文件信息

#ifndef?_FIL_BAD_C_
#define?_FIL_BAD_C_

/****************************************************************************
?*
?*????????????Copyright?(c)?2005?by?HCC?embedded?
?*
?*?This?software?is?copyrighted?by?and?is?the?sole?property?of?
?*?HCC.??All?rights?title?ownership?or?other?interests
?*?in?the?software?remain?the?property?of?HCC.??This
?*?software?may?only?be?used?in?accordance?with?the?corresponding
?*?license?agreement.??Any?unauthorized?use?duplication?transmission??
?*?distribution?or?disclosure?of?this?software?is?expressly?forbidden.
?*
?*?This?Copyright?notice?may?not?be?removed?or?modified?without?prior
?*?written?consent?of?HCC.
?*
?*?HCC?reserves?the?right?to?modify?this?software?without?notice.
?*
?*?HCC?embedded
?*?Budapest?1132
?*?Victor?Hugo?Utca?11-15
?*?Hungary
?*
?*?Tel:??+36?(1)?450?1302
?*?Fax:??+36?(1)?450?1303
?*?http:?www.hcc-embedded.com
?*?email:?info@hcc-embedded.com
?*
?***************************************************************************/

/****************************************************************************
?*
?*?Bad?Block?handling
?*
?***************************************************************************/

#include?“llayer.h“
#include?“mlayer.h“
#include?“fil_wear.h“
#include?“fil_bad.h“

/****************************************************************************
?*
?*?variables
?*
?***************************************************************************/

/****************************************************************************
?*
?*?bb_getmaxreserved
?*
?*?retreives?the?number?of?reserved?block?valid?only?after?bb_init
?*
?*?RETURNS
?*
?*?number?of?used?reserved?entry
?*
?***************************************************************************/

unsigned?short?bb_getmaxreserved()?{
return?gl_mlayer->bad_maxentry;
}

/****************************************************************************
?*
?*?bb_init
?*
?*?initializing?bad?block?handler?this?must?be?called?at?power?on?after
?*?flash?type?are?determined?after?map?page?loaded
?*
?*?INPUTS
?*
?*?maxentry?-?maximum?number?of?entries
?*
?***************************************************************************/

unsigned?char?bb_init(unsigned?short?maxentry)?{
ST_SPARE?*sptr=GET_SPARE_AREA(gl_mlayer->badpagebuffer);
unsigned?short?a;
unsigned?char?ret;
if?(maxentry?>?(MAX_DATA_SIZE/2))?maxentry=(MAX_DATA_SIZE/2); ??//maximum?allowed?in?one?page!

gl_mlayer->bad_table=(t_ba*)gl_mlayer->badpagebuffer;?//set?up?pointer

gl_mlayer->bad_maxentry=maxentry;
gl_mlayer->bad_init_index=0;

if?(gl_mlayer->badblock->pba==BLK_NA)?ret=0xf0;?//not?exist
else?if?(gl_mlayer->badblock->ppo>=MAX_PAGE_PER_BLOCK)?ret=0xf1;?//invalid?page
????else?ret=ll_read((t_ba)(gl_mlayer->start_pba+gl_mlayer->badblock->pba)gl_mlayer->badblock->ppogl_mlayer->badpagebuffer);

if?(!ret)?{
if?(sptr->block_type!=BLK_TYPE_BAD)?ret=0xf2;?//it?is?corre

評論

共有 條評論