Go to the documentation of this file.
53 #ifndef __GR533x_HAL_H__
54 #define __GR533x_HAL_H__
81 #define GLOBAL_EXCEPTION_DISABLE() \
83 uint32_t __l_irq_rest = __get_PRIMASK(); \
90 #define GLOBAL_EXCEPTION_ENABLE() \
91 if(__l_irq_rest == 0) \
104 #define GLOBAL_INT_DISABLE() \
106 extern uint32_t global_int_disable(void); \
107 uint32_t __res_mask = global_int_disable()
112 #define GLOBAL_INT_RESTORE() \
113 extern void global_int_enable(uint32_t mask); \
114 global_int_enable(__res_mask); \
122 #define LOCAL_INT_DISABLE(IRQn_Type) \
124 uint32_t __l_irq_rest = __get_BASEPRI(); \
125 __set_BASEPRI(NVIC_GetPriority(IRQn_Type) + \
126 (1 << (NVIC_GetPriorityGrouping() + 1))); \
131 #define LOCAL_INT_RESTORE() \
132 __set_BASEPRI(__l_irq_rest); \
138 #define CHECK_IS_ON_FPGA() (MCU_SUB->FPGA_CTRL & MCU_SUB_FPGA_CTRL_REG_EXIST)
140 #define SYSTICK_RELOAD_VALUE (SysTick->LOAD)
141 #define SYSTICK_CURRENT_VALUE (SysTick->VAL)
void hal_dwt_disable(uint32_t _demcr_initial, uint32_t _dwt_ctrl_initial)
This function disable the DWT function.
hal_status_t hal_init(void)
This function configures time base source, NVIC and Low level hardware.
void hal_delay(__IO uint32_t delay)
This function provides accurate delay (in milliseconds) based on variable incremented.
uint32_t hal_get_hal_version(void)
This function returns the HAL revision.
void hal_suspend_tick(void)
Suspend Tick increment.
hal_status_t hal_deinit(void)
This function de-initializes common part of the HAL and stops the source of time base.
void hal_dwt_enable(uint32_t _demcr_initial, uint32_t _dwt_ctrl_initial)
This function enable the DWT function.
void hal_resume_tick(void)
Resume Tick increment.
hal_status_t
HAL Status structures definition.
void hal_systick_irq_handler(void)
This function handles SYSTICK interrupt request.
void hal_msp_init(void)
Initialize the MSP.
void hal_increment_tick(void)
This function is called to increment a global variable "g_tick" used as application time base.
void hal_msp_deinit(void)
De-initialize the MSP.
void hal_systick_callback(void)
SYSTICK callback.
uint32_t hal_get_tick(void)
Povides a tick value in millisecond.
PERIPHERAL API DELAY DRIVER.