64 lines
2.3 KiB
C
64 lines
2.3 KiB
C
/*******************************************************************************
|
|
* *
|
|
* Copyright 2010 Rheinmetall Canada Inc. *
|
|
* *
|
|
* No part of this document may be reproduced, stored in *
|
|
* a retrieval system, or transmitted, in any form or by any means, *
|
|
* electronic, mechanical, photocopying, recording, or otherwise, *
|
|
* without the prior written permission of Rheinmetall Canada Inc. *
|
|
* *
|
|
*******************************************************************************/
|
|
/*
|
|
Description:
|
|
This is a template file for standard C header file.
|
|
|
|
*/
|
|
|
|
/* ************************************************************************** */
|
|
/* Revision:
|
|
000 20100616 HCAM
|
|
Original version.
|
|
|
|
### YYYYMMDD Initial, Bug Identification
|
|
Change description.
|
|
*/
|
|
|
|
#ifndef _INC_UTIL_H
|
|
#define _INC_UTIL_H
|
|
|
|
/* ************************************************************************** */
|
|
/* Includes */
|
|
|
|
|
|
/* ************************************************************************** */
|
|
/* Defines */
|
|
#ifdef ENABLE_DEBUG_LOG
|
|
#define DEBUG_LOG_SIZE 300
|
|
#endif
|
|
|
|
/* ************************************************************************** */
|
|
/* Type definitions */
|
|
|
|
|
|
/* ************************************************************************** */
|
|
/* Prototypes */
|
|
short SwapEndianShort(short p_sData);
|
|
int SwapEndianEndianInt(int p_iData);
|
|
#ifdef ENABLE_DEBUG_LOG
|
|
char* GetDebugLogPtr(void);
|
|
void ClearDebugLog(void);
|
|
#endif
|
|
//int AppendCharToStrLeadingZero(char* p_pcString, unsigned char p_cChar, int radix);
|
|
//int AppendLongToStrLeadingZero(char* p_pcString, int p_iChar, int radix);
|
|
int ConvertIntToStrLeadingZero(char* p_pcString, unsigned int p_iChar, int digit);
|
|
int ConvertCharToStrLeadingZero(char* p_pcString, unsigned char p_cChar, int digit);
|
|
int ConvertIntToStr(char* p_pcString, unsigned int p_iChar);
|
|
int ConvertCharToStr(char* p_pcString, unsigned char p_cChar);
|
|
unsigned int ConvertStrToValue(char* p_pcString, int p_iSize, int p_iRadix);
|
|
int Crc8(char* answer, int length);
|
|
void Delay(unsigned int count);
|
|
|
|
#endif
|
|
//EOF
|
|
|