/*********************************************************************
*
* Helper Function Defs for Microchip TCP/IP Stack
*
*********************************************************************
* FileName: Helpers.h
* Dependencies: stacktsk.h
* Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F
* Complier: Microchip C18 v3.02 or higher
* Microchip C30 v2.01 or higher
* Company: Microchip Technology, Inc.
*
* Software License Agreement
*
* This software is owned by Microchip Technology Inc. ("Microchip")
* and is supplied to you for use exclusively as described in the
* associated software agreement. This software is protected by
* software and other intellectual property laws. Any use in
* violation of the software license may subject the user to criminal
* sanctions as well as civil liability. Copyright 2006 Microchip
* Technology Inc. All rights reserved.
*
* This software is provided "AS IS." MICROCHIP DISCLAIMS ALL
* WARRANTIES, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, NOT LIMITED
* TO MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
* INFRINGEMENT. Microchip shall in no event be liable for special,
* incidental, or consequential damages.
*
*
* Author Date Comment
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Nilesh Rajbharti 5/17/01 Original (Rev 1.0)
* Nilesh Rajbharti 2/9/02 Cleanup
********************************************************************/
#ifndef HELPERS_H
#define HELPERS_H
#include "..\Include\Compiler.h"
#include "..\Include\StackTsk.h"
#include "..\Include\GenericTypeDefs.h"
BYTE ReadStringUART(BYTE *Dest, BYTE BufferLen);
BYTE hexatob(WORD_VAL AsciiChars);
BYTE btohexa_high(BYTE b);
BYTE btohexa_low(BYTE b);
WORD swaps(WORD v);
DWORD swapl(DWORD v);
WORD CalcIPChecksum(BYTE *buffer, WORD len);
WORD CalcIPBufferChecksum(WORD len);
void dwordToHex(DWORD c,char *str);
void setVariable(BYTE var, DWORD val);
DWORD getVariable(BYTE var);
void getVariableName(BYTE var,char *str);
void timestampToString(DWORD t, char *str);
#endif