/************************************************************************ Project: Welling Motor Control Paltform Filename: hwsetup.h Partner Filename: hwsetup.c Description: The header file of hwsetup.c Complier: IAR Embedded Workbench for ARM 8.40.2 CPU TYPE : GD32F30x ************************************************************************* Copyright (c) 2022 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 HWSETUP_H #define HWSETUP_H //#include "at32f421.h" #include "ti_msp_dl_config.h" /************************************************************************ Compiler Directives (N/A) ************************************************************************/ #ifdef _HWSETUP_C_ #define _HWSETUP_EXT #else #define _HWSETUP_EXT extern #endif /************************************************************************ Definitions & Macros ************************************************************************/ /* Interrupt ON/OFF define */ #define ENABLE_IRQ __enable_irq() #define DISABLE_IRQ __disable_irq() #define FALSE false #define TURE true #define UART2_ENABLE 1 //0-disbale uart2, 1-enable uart2 /************************************************************************ TypeDefs & Structure defines (N/A) ************************************************************************/ /************************************************************************ Constant Table *************************************************************************/ /************************************************************************ Exported Variables ************************************************************************/ /************************************************************************ RAM ALLOCATION (N/A) ************************************************************************/ /************************************************************************ Exported Function Call Prototypes ************************************************************************/ #ifdef _HWSETUP_C_ _HWSETUP_EXT void hw_voHardwareSetup(void); _HWSETUP_EXT void hw_voInitSysCtrl(void); _HWSETUP_EXT void hw_voInitGPIO(void); _HWSETUP_EXT void hw_voInitSysTick(void); _HWSETUP_EXT void hw_voInitUART(void); _HWSETUP_EXT void delay_1ms(uint32_t count); //_HWSETUP_EXT void delay_decrement(void); #else _HWSETUP_EXT void hw_voHardwareSetup(void); _HWSETUP_EXT void delay_1ms(uint32_t count); //_HWSETUP_EXT void delay_decrement(void); _HWSETUP_EXT void hw_voInitSysTick(void); _HWSETUP_EXT void hw_voInitUART(void); _HWSETUP_EXT void hw_voInitGPIO(void); _HWSETUP_EXT void hw_voInitSysCtrl(void); #endif #define ID_TO_MC_FILTER (uint16_t)0x701 #define ID_TO_MC_MASK (uint16_t)0x70F #define ID_BC_FILTER (uint16_t)0x700 #define ID_BC_MASK (uint16_t)0x70F /************************************************************************ Flag Define (N/A) ************************************************************************/ /***********************************************************************/ #endif /************************************************************************ Copyright (c) 2022 Welling Motor Technology(Shanghai) Co. Ltd. All rights reserved. ************************************************************************* End of this File (EOF)! Do not put anything after this part! ************************************************************************/