00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00024
00025
00026
00027
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 }