beautypg.com

Getch – Zilog ZUSBOPTS User Manual

Page 209

background image

UM017105-0511

Run-Time Library

Zilog Developer Studio II – ZNEO™

User Manual

181

Example

#include

void main(void)

{

DI();/* Disable interrupts */

}

EI

EI

is an intrinsic function that enables all interrupts and is inline-expanded by default. If

the

–reduceopt

compiler option is selected, then this function is not inline-expanded and

is instead implemented as a regular function.

Synopsis

#include

intrinsic void EI(void);

Example

#include

void main(void)

{

EI(); /* Enable interrupts */

}

getch

getch

is a ZILOG function that waits for the next character to appear at the serial port and

returns its value. This function does not wait for end-of-line to return as

getchar

does.

getch

does not echo the character received.

Synopsis

#include

char getch(void) ;

Returns

The next character that is received at the selected UART.

Example

char ch;

ch=getch();

This manual is related to the following products: