beautypg.com

Putch, Read_flash – Zilog Z8F0130 User Manual

Page 257

background image

UM013037-1212

Zilog Functions

Zilog Developer Studio II – Z8 Encore!

User Manual

233

Before using this function, the

init_uart()

function must be called to initialize and

select the UART. The default UART is _UART0.

putch

The

putch

function is a Zilog function that sends a character to the selected UART and

returns the error status.

Synopsis

#include

reentrant unsigned char putch( char ch ) ;

Returns

A zero is returned on success; a nonzero is returned on failure.

Example

#include

char ch = 'c' ;

unsigned char err;

void main()

{

init_uart(_UART0,_DEFFREQ,_DEFBAUD);

err = putch( ch ) ; // Send character to _UART0

}

Before using this function, the

init_uart()

function must be called to initialize and

select the UART. The default UART is _UART0.

READ_FLASH

The READ_FLASH function is a Zilog function that reads a value from Flash memory at
the specified address.

Synopsis

#include

char reentrant READ_FLASH(rom const void *addr);

Returns

The function returns data read from the specified address addr.

Note:

Note: