User_DecVar.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // TI File $Revision: /main/2 $
  2. // Checkin $Date: April 28, 2005 14:57:07 $
  3. //###########################################################################
  4. //
  5. // FILE: DSP281x_XIntrupt.h
  6. //
  7. // TITLE: DSP281x Device External Interrupt Register Definitions.
  8. //
  9. //###########################################################################
  10. // $TI Release: DSP281x C/C++ Header Files V1.20 $
  11. // $Release Date: July 27, 2009 $
  12. //###########################################################################
  13. #ifndef USER_DECVAR_H
  14. #define USER_DECVAR_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //软件版本号------------------------------
  19. #define SOFTWARE_VERSION1 0x0203
  20. #define SOFTWARE_VERSION2 1
  21. #define SOFTWARE_VERSION3 0
  22. #define SOFTWARE_VERSION4 15040
  23. #define LOW 0
  24. #define HIGH 1
  25. #define TRUE 1
  26. #define FALSE 0
  27. #define Q15_MAX 32767
  28. #define PI 25735 //25723 // Q13, 3.14159
  29. #define GENHAO2_1 23170 //Q15 根号2分之1
  30. #define POWER_TORQUE_COE 9550
  31. #define VVVF_DEF 0
  32. extern int16 CanSend1;
  33. extern int16 CanSend2;
  34. extern int16 CanSend3;
  35. extern int16 CanSend4;
  36. extern int16 CanInitFlag;
  37. //通信协议ID-------------------------------------------------
  38. #define SHAKE_FIR_REC 0x11111200
  39. #define SHAKE_FIR_ACK 0x11111201
  40. #define SHAKE_SEC_SEND 0x11111300
  41. #define SHAKE_SEC_REC 0x11111301
  42. #define SHAKE_SEC_ACK 0x11111302
  43. #define DATA_REC_SEND 0x11111400
  44. #define DATA_REC_ACK 0x11111500
  45. #define FILE_SEND_FINISH 0x11111600
  46. #define FILE_SEND_ACK 0x11111601
  47. #define SEND_NULL 0xFFFFFFFF
  48. #define BOOT_SHAKE_SUCCESS 0x03
  49. //---------------------------------------------------------
  50. struct BOOTSTATUS{
  51. int16 FrameId;
  52. int16 LineDataLen;
  53. int16 LineId;
  54. int16 HexRow;
  55. int16 WorkStatus;
  56. int16 Reboot;
  57. Uint32 SendNum;
  58. unsigned char Buffer[100];
  59. };
  60. extern struct BOOTSTATUS BootStatus;
  61. struct CANMBOX_USER_REGS
  62. {
  63. Uint16 MboxRxFlg;
  64. Uint16 MboxNum;
  65. Uint16 MboxDLC;
  66. Uint32 MboxID;
  67. int16 MboxWord1;
  68. int16 MboxWord2;
  69. int16 MboxWord3;
  70. int16 MboxWord4;
  71. };
  72. extern struct CANMBOX_USER_REGS CanMboxUserRegsT;
  73. extern struct CANMBOX_USER_REGS CanMboxUserRegsR;
  74. extern struct CANMBOX_USER_REGS CanMboxUserRegsR2;
  75. extern void ECanMboxSend(struct CANMBOX_USER_REGS *pRegs);
  76. extern struct CANMBOX_USER_REGS ECanMboxRead(void);
  77. extern void CanMaster(void);
  78. extern void RunLedSet(void);
  79. extern void RunLedClr(void);
  80. extern void RunLedControl(void);
  81. #ifdef __cplusplus
  82. }
  83. #endif /* extern "C" */
  84. #endif // end of DSP281x_XINTF_H definition
  85. //===========================================================================
  86. // No more.
  87. //===========================================================================