#ifndef _UTIL_H_
#define _UTIL_H_

/*
*
* (c) Copyright 2002, Wiznet, Seoul, Korea
*
* Filename	: util.h
* Version	: 1.0
* Programmer(s)	: 
* Created	: 2003/01/28
* Description   : The utility functions for AVREVB. (AVR-GCC Compiler)
*/

#include "../mcu/types.h"

#define NO_USE_UTIL_FUNC


extern u_char D2C(char c); 					/* Convert HEX(0-F) to a character */
extern char C2D(u_char c); 					/* Convert a character to HEX */
extern u_int ATOI(char* str,u_int base); 			/* Convert a string to integer number */
extern u_char ValidATOI(char* str, int base, u_int* ret); 		/* Verify character string and Convert it to (hexa-)decimal. */
extern void replacetochar(char * str, char oldchar, char newchar); /* Replace old character with new character in the string */

u_short swaps(u_int i);
u_long swapl(u_long l);

#ifndef NO_USE_UTIL_FUNC
extern char* ITOA(u_int value,char* str,u_int base);		/* Convert Decimal Number to string */
#endif

#endif /* _UTIL_H */

