/************************************************************************ 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 que_stErrorLog; extern FLASH_ERROR_QUEUE que_stFlashErrorLog; /************************************************************************ Exported Function Call Prototypes (N/A) ************************************************************************/ extern UBYTE que_ubPushIn(FLASH_ERROR_QUEUE *Q, const 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! *************************************************************************/