提交 | 用户 | age
|
8b51c7
|
1 |
/** |
Q |
2 |
****************************************************************************** |
|
3 |
* @file : functions.h |
|
4 |
* @brief : Header for functions.c file. |
|
5 |
* This file contains the user functions defines of the application. |
|
6 |
****************************************************************************** |
|
7 |
*/ |
|
8 |
#ifndef __MYFUNCTIONS_H__ |
|
9 |
#define __MYFUNCTIONS_H__ |
|
10 |
|
|
11 |
#include "GlobalDef.h" |
|
12 |
|
|
13 |
typedef unsigned char uint8_t; |
|
14 |
typedef unsigned char uchar; |
|
15 |
typedef unsigned short uint16_t; |
|
16 |
//typedef unsigned long uint32_t; |
|
17 |
typedef int int32_t; |
|
18 |
|
|
19 |
int InituS(int TickFreq1); |
|
20 |
unsigned int GetuS(void); |
|
21 |
|
|
22 |
int Uart1SendDMA(void * pData, int nSize); |
|
23 |
int Uart1TriggerSendDMA(void ); |
|
24 |
int Uart2SendDMA(void * pData, int nSize); |
|
25 |
int Uart2RecvDMA(void * pBuf, int nSize); |
|
26 |
int Uart2TriggerRecvDMA(void ); |
|
27 |
int Uart2TriggerSendDMA(void ); |
|
28 |
int Uart3SendDMA(void * pData, int nSize); |
|
29 |
int Uart3RecvDMA(void * pBuf, int nSize); |
|
30 |
int Uart3TriggerRecvDMA(void ); |
|
31 |
int Uart3TriggerSendDMA(void ); |
|
32 |
void TriggerPendSV(void); |
|
33 |
void PendSvCallBack(void); |
|
34 |
void SPI1_IRQ_CallBack(void); |
|
35 |
|
|
36 |
void Uart1SendDone(void); |
|
37 |
void Uart1RecvDone(void); |
|
38 |
void Uart2SendDone(void); |
|
39 |
void Uart2RecvDone(void); |
|
40 |
int PutStr(char * str1, int len1); |
|
41 |
int SendPacket(int nChn, void * pBuf,int len1); |
|
42 |
//int SendPacket1(void * pBuf,int len1); |
|
43 |
//int SendPacket2(pKBPacket p1,int len1); |
|
44 |
void ToggleRunLed(void ); |
|
45 |
void ToggleErrLed(void ); |
|
46 |
void ToggleErr2Led(void ); |
|
47 |
void ToggleOutStat(void ); |
|
48 |
void SetRunLed(uchar bOn); |
|
49 |
void SetErrLed(uchar bOn); |
|
50 |
void SetErr2Led(uchar bOn); |
|
51 |
void SetOutStat(uchar bOn); |
|
52 |
inline unsigned int GetTick(void); |
|
53 |
unsigned short crc_check(const unsigned char * data, unsigned int length); |
|
54 |
unsigned short crc16bitbybit(const unsigned char *ptr, unsigned int len); |
|
55 |
uint16_t crc16table(const uint8_t *ptr, uint16_t len); |
|
56 |
//uint16_t crc16tablefast(const uint8_t *ptr, uint16_t len) ; |
|
57 |
|
|
58 |
|
|
59 |
#endif /* __MYFUNCTIONS_H__ */ |