12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /************************************************************************
- Project: Welling Motor Control Paltform
- Filename: QUEUE.h
- Partner Filename: QUEUE.c
- Description: The header file of QUEUE.c
- Complier: IAR Embedded Workbench for ARM 7.80, IAR Systems.
- CPU TYPE : GD32F3x0
- *************************************************************************
- Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
- All rights reserved.
- *************************************************************************
- *************************************************************************
- Revising History (ECL of this file):
- ************************************************************************/
- /************************************************************************
- Beginning of File, do not put anything above here except notes
- Compiler Directives:
- *************************************************************************/
- #ifndef QUEUE_H
- #define QUEUE_H
- #include "typedefine.h"
- #include "canAppl.h"
- /************************************************************************
- Typedefs & Structure Defines (N/A)
- ************************************************************************/
- #define QUEUE_SIZE 16u
- /************************************************************************
- Typedefs & Structures Defines
- ************************************************************************/
- typedef struct
- {
- UWORD NotesInfo1; //备注信息1,地址偏移 0
- UWORD NotesInfo2; //备注信息2,地址偏移 2
- UWORD NotesInfo3; //备注信息3,地址偏移 4
- ULONG ErrorCode; //故障码 4 bytes, 地址偏移 6
- ULONG RunTime; //运行时间 4bytes, 地址偏移 10
- MC_RunInfo_Struct_t RunInfo; //运行信息 32bytes, 地址偏移 14
- SWORD IqCurrentPu; // Iq电流,地址偏移 46
- SWORD IqVoltagePu; // Iq电压,地址偏移 48
- SWORD IdCurrentPu; // Id电流,地址偏移 50
- SWORD IdVoltagePu; // Id电压,地址偏移 52
- } ERROR_LOG; //共54字节
- typedef struct
- {
- UBYTE ubHead;
- UBYTE ubRear;
- ERROR_LOG stLog[QUEUE_SIZE];
- } FLASH_ERROR_QUEUE;
- extern ERROR_LOG stErrorLog;
- extern FLASH_ERROR_QUEUE stFlashErrorLog;
- /************************************************************************
- Exported Function Call Prototypes (N/A)
- ************************************************************************/
- extern UBYTE que_ubPushIn(FLASH_ERROR_QUEUE *Q, ERROR_LOG *rxdata, UBYTE length);
- extern UBYTE que_ubPopOut(FLASH_ERROR_QUEUE *Q, ERROR_LOG *buf, UBYTE length);
- extern void que_voInit(FLASH_ERROR_QUEUE *Q);
- #endif
- /*************************************************************************
- Copyright (c) 2011 Welling Motor Technology(Shanghai) Co. Ltd.
- All rights reserved.
- *************************************************************************
- End of this File (EOF):
- Do not put anything after this part!
- *************************************************************************/
|