ascii.h File Reference

#include "uart_lib.h"
#include <stdio.h>

Include dependency graph for ascii.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

U8 ascii_to_bin (U8 c)
U8 bin_to_ascii (U8 c)


Function Documentation

U8 ascii_to_bin ( U8  c  ) 

This function returns the binary value of an ascii digit.

Parameters:
none 
Returns:
none
/

Definition at line 39 of file ascii.c.

00040 {
00041   if (c>='a') return(c-('a'-0x0A));
00042   if (c>='A') return(c-('A'-0x0A));
00043   return(c-'0');
00044 }

U8 bin_to_ascii ( U8  c  ) 

This function returns the ascii value of a quartet

Parameters:
none 
Returns:
none /

Definition at line 54 of file ascii.c.

00055 {
00056   if (c>=0x0A) return (c+('A'-0x0A));
00057   return (c+'0');
00058 }


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