hwsetup.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /************************************************************************
  2. Project: Welling Motor Control Paltform
  3. Filename: hwsetup.h
  4. Partner Filename: hwsetup.c
  5. Description: The header file of hwsetup.c
  6. Complier: IAR Embedded Workbench for ARM 8.40.2
  7. CPU TYPE : GD32F30x
  8. *************************************************************************
  9. Copyright (c) 2022 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 HWSETUP_H
  20. #define HWSETUP_H
  21. //#include "at32f421.h"
  22. #include "ti_msp_dl_config.h"
  23. /************************************************************************
  24. Compiler Directives (N/A)
  25. ************************************************************************/
  26. #ifdef _HWSETUP_C_
  27. #define _HWSETUP_EXT
  28. #else
  29. #define _HWSETUP_EXT extern
  30. #endif
  31. /************************************************************************
  32. Definitions & Macros
  33. ************************************************************************/
  34. /* Interrupt ON/OFF define */
  35. #define ENABLE_IRQ __enable_irq()
  36. #define DISABLE_IRQ __disable_irq()
  37. #define FALSE false
  38. #define TURE true
  39. #define UART2_ENABLE 1 //0-disbale uart2, 1-enable uart2
  40. /************************************************************************
  41. TypeDefs & Structure defines (N/A)
  42. ************************************************************************/
  43. /************************************************************************
  44. Constant Table
  45. *************************************************************************/
  46. /************************************************************************
  47. Exported Variables
  48. ************************************************************************/
  49. /************************************************************************
  50. RAM ALLOCATION (N/A)
  51. ************************************************************************/
  52. /************************************************************************
  53. Exported Function Call Prototypes
  54. ************************************************************************/
  55. #ifdef _HWSETUP_C_
  56. _HWSETUP_EXT void hw_voHardwareSetup(void);
  57. _HWSETUP_EXT void hw_voInitSysCtrl(void);
  58. _HWSETUP_EXT void hw_voInitGPIO(void);
  59. _HWSETUP_EXT void hw_voInitSysTick(void);
  60. _HWSETUP_EXT void hw_voInitUART(void);
  61. _HWSETUP_EXT void delay_1ms(uint32_t count);
  62. //_HWSETUP_EXT void delay_decrement(void);
  63. #else
  64. _HWSETUP_EXT void hw_voHardwareSetup(void);
  65. _HWSETUP_EXT void delay_1ms(uint32_t count);
  66. //_HWSETUP_EXT void delay_decrement(void);
  67. _HWSETUP_EXT void hw_voInitSysTick(void);
  68. _HWSETUP_EXT void hw_voInitUART(void);
  69. _HWSETUP_EXT void hw_voInitGPIO(void);
  70. _HWSETUP_EXT void hw_voInitSysCtrl(void);
  71. #endif
  72. #define ID_TO_MC_FILTER (uint16_t)0x701
  73. #define ID_TO_MC_MASK (uint16_t)0x70F
  74. #define ID_BC_FILTER (uint16_t)0x700
  75. #define ID_BC_MASK (uint16_t)0x70F
  76. /************************************************************************
  77. Flag Define (N/A)
  78. ************************************************************************/
  79. /***********************************************************************/
  80. #endif
  81. /************************************************************************
  82. Copyright (c) 2022 Welling Motor Technology(Shanghai) Co. Ltd.
  83. All rights reserved.
  84. *************************************************************************
  85. End of this File (EOF)!
  86. Do not put anything after this part!
  87. ************************************************************************/