Zilog Z8F0130 User Manual

Page 255

Advertising
background image

UM013037-1212

Zilog Functions

Zilog Developer Studio II – Z8 Encore!

User Manual

231

Synopsis

#include <eZ8.h>

void reentrant INIT_FLASH(unsigned short freq);

Returns

None.

Example

#include <eZ8.h>

char x;

void main()

{

INIT_FLASH(FREQ18432); /* Target clock frequency */

WRITE_FLASH((rom const *)0x2f00,x); /* write to Flash */

X = READ_FLASH((rom const *)0x2f00); /* read from Flash */

}

Do not write to Flash memory more than twice. To write to Flash memory more than
twice, you must perform a page erase.


Beginning with the ZDS II for Z8 Encore! release 4.8, there is a slight change in the func-
tion prototype for INIT_FLASH.

Previous Prototype

#if defined(_Z8F642)

void reentrant INIT_FLASH(unsigned short freq);

#else

void intrinsic reentrant INIT_FLASH(unsigned short freq);

#endif

New Prototype

void reentrant INIT_FLASH(unsigned short freq);

For most Z8 Encore! microcontroller variants, the

intrinsic

keyword has been deleted

in the ZDS II release 4.8.0. This change is taken care of automatically as long as you are
using the standard Zilog library version of INIT_FLASH and including the standard
header file

ez8.h

. However, since the new standard header uses the new prototype, if you

have customized INIT_FLASH in your application, you must make modifications so that
the header and function declarations agree.

Notes:

Advertising