IBASE MB899X User Manual

Page 64

Advertising
background image

APPENDIX

60

MB899X User’s Manual


Filename: W627hf.cpp
//=====================================================================
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
// PURPOSE.
//
//=====================================================================
unsigned int W627HF_BASE;
void Unlock_W627HF (void);
void Lock_W627HF (void);
//=======================================================================
unsigned int Init_W627HF(void)
{

unsigned int result;

//0=NA, 1=627HF, 2=627THF, 4=627EHF


//

W627HF_BASE = 0x2E;

W627HF_BASE = 0x4E;

result = Get_W627HF_Reg(0x20);

if (result == 0x52)

{

result

=

1;

goto

Init_Finish;

}

else if (result == 0x82)

{

result

=

2;

goto

Init_Finish;

}

else if (result == 0x88)

{

result

=

4;

goto

Init_Finish;

}

//

W627HF_BASE = 0x4E;

W627HF_BASE = 0x2E;


result = Get_W627HF_Reg(0x20);

if (result == 0x52)

{

result

=

1;

goto

Init_Finish;

}

else if (result == 0x82)

{

result

=

2;

goto

Init_Finish;

}

else if (result == 0x88)

{

result

=

4;

goto

Init_Finish;

}

W627HF_BASE = 0x00;

result = 0;


Init_Finish:
return

(result);

Advertising
This manual is related to the following products: