
UM017105-0511 Run-Time Library
Zilog Developer Studio II – ZNEO™
User Manual
183
Before using the kbhit function, the init_uart() function must be called to initialize
and select the UART. The default UART is _UART0.
putch
putch is a Zilog function that sends a character to the selected UART and returns an error
status.
Synopsis
#include <sio.h>
int putch( char ch ) ;
Returns
A zero is returned on success; a nonzero is returned on failure.
Example
char ch = 'c' ;
int err;
err = putch( ch ) ;
Before using the putch function, the init_uart() function must be called to initialize
and select the UART. The default UART is _UART0.
RI
RI (restore interrupt) is an intrinsic function that restores interrupt status. It is intended to
be paired with an earlier call to
TDI(), which has previously saved the existing interrupt
status. See the TDI
section on page 185 for a discussion of that function. The interrupt sta-
tus, which is passed as a parameter to
RI(), consists of the Flags register extended to
16 bits for efficient stack storage. This function inline-expanded by default. If the
–redu-
ceopt
compiler option is selected, then this function is not inline-expanded and is instead
implemented as a regular function.
Synopsis
#include <zneo.h>
intrinsic void RI(unsigned short istat);
Example
#include <zneo.h>
Kommentare zu diesen Handbüchern