Chinaunix
标题:
坏块判断
[打印本页]
作者:
myfaxmail
时间:
2011-12-23 03:25
标题:
坏块判断
static u_size8 is_bad_block
(
u_size32 addr
)
{
u_size32 i
;
u_size8 tmp
;
EN_NANDFLASH
;
WCMD
(
READ1
)
;
rNFADDR
=
2048
&
0xff
;
rNFADDR
=
(
2048
>
>
8
)
&
0xf
;
rNFADDR
=
(
addr
>
>
12
)
&
0xff
;
rNFADDR
=
(
addr
>
>
20
)
&
0xff
;
rNFADDR
=
(
addr
>
>
28
)
&
0x1
;
WCMD
(
READ2
)
;
delay
(
10
)
;
noBUSY
;
tmp
=
rNFDATA
;
if
(
tmp
!
=
0xff
)
{
DIS_NANDFLASH
;
return 1
;
}
DIS_NANDFLASH
;
return 0
;
}
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2