macroequ.h 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /************************************************************************
  2. Project: Welling Motor Control Paltform
  3. Filename: macroequ.h
  4. Partner Filename: macroequ.c
  5. Description: The header file of macroequ.c
  6. Complier: IAR Embedded Workbench for ARM 7.80.4
  7. CPU TYPE : GD32F3x0
  8. *************************************************************************
  9. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  10. All rights reserved.
  11. *************************************************************************
  12. *************************************************************************
  13. Revising History (ECL of this file):
  14. ************************************************************************/
  15. /************************************************************************
  16. Beginning of File, do not put anything above here except notes
  17. Compiler Directives
  18. ************************************************************************/
  19. #ifndef MACROEQU_H
  20. #define MACROEQU_H
  21. /************************************************************************
  22. Compiler Directives (N/A)
  23. ************************************************************************/
  24. #ifdef _MACROEQU_C_
  25. #define _MACROEQU_EXT
  26. #else
  27. #define _MACROEQU_EXT extern
  28. #endif
  29. /************************************************************************
  30. Definitions & Macros (#define ...)
  31. ************************************************************************/
  32. /************************************************************************
  33. TypeDefs & Structure defines
  34. ************************************************************************/
  35. /************************************************************************
  36. Constant Table
  37. *************************************************************************/
  38. /************************************************************************
  39. Exported Variables:
  40. ************************************************************************/
  41. #ifdef _MACROEQU_C_
  42. _MACROEQU_EXT UWORD MN_BUFFER[0x20] __attribute__((section(".buffer_section")));
  43. _MACROEQU_EXT UWORD TBP_BUFFER[0x20] __attribute__((section(".buffer_section")));
  44. _MACROEQU_EXT UWORD TBS_BUFFER[0x20] __attribute__((section(".buffer_section")));
  45. _MACROEQU_EXT UWORD TBC_BUFFER[0x20] __attribute__((section(".buffer_section")));
  46. _MACROEQU_EXT UWORD FUNCTION_BUFFER[0x20] __attribute__((section(".buffer_section")));
  47. #else
  48. _MACROEQU_EXT UWORD MN_BUFFER[0x20];
  49. _MACROEQU_EXT UWORD TBP_BUFFER[0x20];
  50. _MACROEQU_EXT UWORD TBS_BUFFER[0x20];
  51. _MACROEQU_EXT UWORD TBC_BUFFER[0x20];
  52. _MACROEQU_EXT UWORD FUNCTION_BUFFER[0x20];
  53. #endif
  54. /************************************************************************
  55. RAM ALLOCATION:
  56. ************************************************************************/
  57. #define cmd_stCmdGenIn (*(CMD_GEN_IN *)TBS_BUFFER)
  58. #define cmd_stCmdGenCoefIn (*(CMD_GEN_COFIN *)MN_BUFFER)
  59. /************************************************************************
  60. Exported Function Call Prototypes (N/A)
  61. ************************************************************************/
  62. /************************************************************************
  63. Local Function Call Prototypes (N/A)
  64. ************************************************************************/
  65. /************************************************************************
  66. Flag Define (N/A)
  67. ************************************************************************/
  68. /***********************************************************************/
  69. #endif
  70. /************************************************************************
  71. Copyright (c) 2018 Welling Motor Technology(Shanghai) Co. Ltd.
  72. All rights reserved.
  73. *************************************************************************
  74. End of this File (EOF):
  75. Do not put anything after this part!
  76. ************************************************************************/