ascii.c

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 //_____  I N C L U D E S ___________________________________________________
00018 
00019 #include "ascii.h"
00020 
00021 
00022 //_____ M A C R O S ________________________________________________________
00023 
00024 //_____ D E F I N I T I O N S ______________________________________________
00025 
00026 //_____ D E C L A R A T I O N S ____________________________________________
00027 
00028 
00029 
00038 U8 ascii_to_bin (U8 c)
00039 {
00040   if (c>='a') return(c-('a'-0x0A));
00041   if (c>='A') return(c-('A'-0x0A));
00042   return(c-'0');
00043 }
00044 
00053 U8 bin_to_ascii (U8 c)
00054 {
00055   if (c>=0x0A) return (c+('A'-0x0A));
00056   return (c+'0');
00057 }

Generated on Wed Jul 12 16:55:10 2006 for Atmel BLDC Sensorless on ATAVRMC100 by  doxygen 1.4.7