/** ****************************************************************************** * @file : functions.h * @brief : Header for functions.c file. * This file contains the user functions defines of the application. ****************************************************************************** */ #ifndef __MYFUNCTIONS_H__ #define __MYFUNCTIONS_H__ #include "GlobalDef.h" typedef unsigned char uint8_t; typedef unsigned char uchar; typedef unsigned short uint16_t; //typedef unsigned long uint32_t; typedef int int32_t; int InituS(int TickFreq1); unsigned int GetuS(void); int Uart1SendDMA(void * pData, int nSize); int Uart1TriggerSendDMA(void ); int Uart2SendDMA(void * pData, int nSize); int Uart2RecvDMA(void * pBuf, int nSize); int Uart2TriggerRecvDMA(void ); int Uart2TriggerSendDMA(void ); int Uart3SendDMA(void * pData, int nSize); int Uart3RecvDMA(void * pBuf, int nSize); int Uart3TriggerRecvDMA(void ); int Uart3TriggerSendDMA(void ); void TriggerPendSV(void); void PendSvCallBack(void); void SPI1_IRQ_CallBack(void); void Uart1SendDone(void); void Uart1RecvDone(void); void Uart2SendDone(void); void Uart2RecvDone(void); int PutStr(char * str1, int len1); int SendPacket(int nChn, void * pBuf,int len1); //int SendPacket1(void * pBuf,int len1); //int SendPacket2(pKBPacket p1,int len1); void ToggleRunLed(void ); void ToggleErrLed(void ); void ToggleErr2Led(void ); void ToggleOutStat(void ); void SetRunLed(uchar bOn); void SetErrLed(uchar bOn); void SetErr2Led(uchar bOn); void SetOutStat(uchar bOn); inline unsigned int GetTick(void); unsigned short crc_check(const unsigned char * data, unsigned int length); unsigned short crc16bitbybit(const unsigned char *ptr, unsigned int len); uint16_t crc16table(const uint8_t *ptr, uint16_t len); //uint16_t crc16tablefast(const uint8_t *ptr, uint16_t len) ; #endif /* __MYFUNCTIONS_H__ */