echoback.c

00001 #include "sh7045lib.h"
00002 
00003 #define PORT SCI_1
00004 
00005 void __main(void) {}
00006 int main(void) {
00007 
00008   init_sci(PORT, 4);
00009   set_imask(0);
00010   putstr(PORT, "echoback program begin.\r\n");
00011 
00012   while (1) {
00013     char ch;
00014     sci_read(PORT, &ch, 1);
00015     if (ch >= 'a' && ch <= 'z') {
00016       ch += 'A' - 'a';
00017     }
00018     sci_write(PORT, &ch, 1);
00019   }
00020 }
00021 

Generated on Mon Apr 13 22:52:04 2009 by  doxygen 1.5.7.1