ascii.c File Reference


Detailed Description

Copyright (c) 2004This file manages the µshell task for file system.

Please read file license.txt for copyright notice.

Version:
1.1 (mc100_bldc_sensorless_0_1_0)
Todo:
Bug:
/

Definition in file ascii.c.

#include "ascii.h"

Include dependency graph for ascii.c:

Go to the source code of this file.

Functions

U8 ascii_to_bin (U8 c)
 This function returns the binary value of an ascii digit.
U8 bin_to_ascii (U8 c)
 This function returns the ascii value of a quartet.


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 38 of file ascii.c.

Referenced by convert_param1(), and convert_param2().

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

Here is the caller graph for this function:

U8 bin_to_ascii ( U8  c  ) 

This function returns the ascii value of a quartet.

Parameters:
none 
Returns:
none
/

Definition at line 53 of file ascii.c.

Referenced by print_hex16().

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

Here is the caller graph for this function:


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