ascii.c

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

Generated on Tue Sep 16 18:11:19 2008 for Atmel BLDC Sinusoidal on ATAVRMC100 by  doxygen 1.5.3