beautypg.com

Zilog functions – Zilog Z8F0130 User Manual

Page 252

background image

Using the ANSI C-Compiler

UM013037-1212

228

Zilog Developer Studio II – Z8 Encore!
User Manual

Macros

Functions

These I/O functions are provided in each of two libraries:

A limited C Serial IO library

A full-fledged Zilog Standard Library (ZSL)

When you select ZSL, these functions are linked from ZSL; otherwise, these functions are
linked from the C Serial IO library.

Zilog Functions

The following functions are Zilog specific:

DI

– see page 229

EI

– see page 229

getch

– see page 230

INIT_FLASH

– see page 230

init_uart

– see page 232

kbhit

– see page 232

_DEFFREQ

Expands to unsigned long default frequency.

_DEFBAUD

Expands to unsigned long default baud rate.

_UART0

Expands to an integer indicating UART0.

_UART1

Expands to an integer indicating UART1.

int getch( void ) ;

Returns the data byte available in the selected
UART.

int init_uart(int port,unsigned long freq, unsigned long
baud);

Initializes the selected UART for specified
settings and returns the error status.

unsigned char kbhit(void);

Checks the receive data available on selected
UART.

reentrant unsigned char putch( char ) ;

Sends a character to the selected UART and
returns the error status.

int select_port(int port);

Selects the UART. Default is _UART0.

Note: