beautypg.com

Nonstandard i/o functions

Page 251

background image

UM013037-1212

Zilog Header Files

Zilog Developer Studio II – Z8 Encore!

User Manual

227

Refer to the appropriate Z8 Encore! product specification for the list of peripheral registers
supported.

<

eZ8.h

> also has the macro definition for the Z8 Encore! Flash option bytes:

<

eZ8.h

> also has a macro for interrupt vector addresses:

Refer to the appropriate Z8 Encore! product specification for the list of peripheral registers
supported.

Functions

Nonstandard I/O Functions

This header contains nonstandard Z8 Encore! specific input/output macros and functions.

FLASH_OPTION1

Expands to a rom char at address 0x0.

FLASH_OPTION2

Expands to a rom char at address 0x1.

RESET

Expands to Reset vector number.

intrinsic void EI(void);

Enable interrupts.

intrinsic void DI(void);

Disable interrupts.

intrinsic SET_VECTOR(int,void (* func) (void));

Set interrupt vector.

void reentrant INIT_FLASH(unsigned short freq);

Initialize Flash frequency.

char reentrant READ_FLASH(rom const void *addr);

Read Flash memory.

void reentrant WRITE_FLASH(rom const void *addr,char val);

Write Flash memory.

char reentrant READ_NVDS(char addr);

Read NVDS memory.

int reentrant WRITE_NVDS(char value, char addr);

Write NVDS memory.

int reentrant READ_NVDS_GET_STATUS(char addr);

Read NVDS, get status.

char reentrant WRITE_NVDS_GET_STATUS(char value, char addr);

Write NVDS, get status.

intrinsic void RI(unsigned char istat);

Restores interrupts.

intrinsic unsigned char TDI(void);

Tests and disables interrupts.