print.c

gehe zur Dokumentation dieser Datei
00001 /****************************************************************************/
00041 /*****************************************************************************
00042 *                                                                            *
00043 *   This program is free software; you can redistribute it and/or modify     *
00044 *   it under the terms of the GNU General Public License as published by     *
00045 *   the Free Software Foundation; either version 2 of the License, or        *
00046 *   any later version.                                                       *
00047 *                                                                            *
00048 *****************************************************************************/
00049 #include "asuro.h"
00050 
00051 
00052 
00053 /****************************************************************************/
00092 void PrintInt (
00093   int wert)
00094 {
00095   char text [7];                        // "-12345"
00096 
00097   itoa (wert, text, 10);
00098   SerPrint (text);
00099 }
00100 
00101 
00102 
00103 /****************************************************************************/
00131 void PrintLong (
00132   long wert)
00133 {
00134   char text [12];                       // '-'1234567891'\0'
00135 
00136   ltoa (wert, text, 10);
00137   SerPrint (text);
00138 }
00139 
00140 
00141 
00142 /****************************************************************************/
00166 void UartPutc (
00167   unsigned char zeichen)
00168 {
00169   UCSRB  = 0x08;                        // enable transmitter
00170   UCSRA |= 0x40;                        // clear transmitter flag
00171   while (!(UCSRA & 0x20))               // wait for empty transmit buffer
00172     ;
00173   UDR = zeichen;
00174   while (!(UCSRA & 0x40))               // Wait for transmit complete flag (TXC)
00175     ;
00176 }
00177 
00178 
00179 
00180 /****************************************************************************/
00200 void SerPrint (
00201   unsigned char *data)
00202 {
00203   unsigned char i = 0;
00204 
00205   while (data [i] != 0x00)
00206     UartPutc (data [i++]);
00207 }

Erzeugt am Wed Feb 14 16:10:02 2007 für ASURO Library von  doxygen 1.5.1-p1