ascii.h File Reference

,v More...

#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)
 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.


Detailed Description

,v

Copyright (c) 2006 Atmel.

This file provides ASCII functions for the µshell task.

Version:
1.1

Definition in file ascii.h.


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

Referenced by convert_param1(), and convert_param2().

00035 {
00036   if (c>='a') return(c-('a'-0x0A));
00037   if (c>='A') return(c-('A'-0x0A));
00038   return(c-'0');
00039 }

U8 bin_to_ascii ( U8  c  ) 

This function returns the ascii value of a quartet.

Parameters:
none 
Returns:
none
/

Definition at line 49 of file ascii.c.

Referenced by print_hex16().

00050 {
00051   if (c>=0x0A) return (c+('A'-0x0A));
00052   return (c+'0');
00053 }


Generated on Wed Oct 22 15:03:59 2008 for AVR172 : Atmel BLDC control on ATAVRMC310 with ATmega32M1 by  doxygen 1.5.7.1