
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 115
Putch()
Func.: Send one character on screen.
Syntax:
void Putch(int data);
Header: #include ”mmi100.h”
Description:
data: 0 to 255.
If data > 255, only the low byte will be send out.
Example: Please refer to “Kbhit()” for example.
Puts()
Func.: Send a string on screen.
Syntax:
void Puts(char *str);
Header: #include ”mmi100.h”
Description:
Puts will call Putch to send the string.
str: The pointer to the string to be send.
Example: Please refer to “Kbhit()” for example.
Scanf()
Func.: Scan character from input. Like C's scanf. ( cannot used on MSC / VC++)
Syntax:
int Scanf(char *fmt, ...);
Header: #include ”mmi100.h”
Description:
R
eturn the number of input fields successfully scanned, converted, and
stored. The return value does not include scanned fields that were not
stored.
Return value = 0 if no fields were stored.
Return value = EOF if attempts to read at end-of-string.
Example: Napdos\7188\miniOS7\Demo\MSc\Scanf.c
Print()
Func.: Print formatted character to screen. Like C's printf.
Syntax:
int Print(char *fmt,...);
Header: #include ”mmi100.h”
Description:
This function is used to instead of printf, and the only difference between
Print and printf is Print do not transfer '\n' to '\n'+'\r'. That is '\
out the code 0x0A, not 0x0A+0x0D. User has to use ‘\n\r’ for ‘
and return’. The printed message is send out to COM1.
115200,N,8,1)
Input Parameter: Please refer to C's standard function printf.
Return Value: The character number to be sent out.
Example: Please refer to “Kbhit()” for example.