lib_cortex.h 1.5 KB
Newer Older
F
FuChao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
/**
  ******************************************************************************
  * @file    lib_Cortex.h 
  * @author  Application Team
  * @version V4.4.0
  * @date    2018-09-27
  * @brief   Cortex module driver.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

#ifndef __LIB_CORTEX_H
#define __LIB_CORTEX_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "target.h"   


#define IS_CORTEX_NVIC_DEVICE_IRQ(IRQ)  ((IRQ) >= 0x00)
   
#define IS_CORTEX_NVIC_PREEMPTION_PRIORITY(PRIORITY)  ((PRIORITY) < 0x4)
   
/* Exported Functions ------------------------------------------------------- */
void     CORTEX_SetPriority_ClearPending_EnableIRQ(IRQn_Type IRQn, uint32_t Priority);
   
void     CORTEX_NVIC_EnableIRQ(IRQn_Type IRQn);
void     CORTEX_NVIC_DisableIRQ(IRQn_Type IRQn);
uint32_t CORTEX_NVIC_GetPendingIRQ(IRQn_Type IRQn);
void     CORTEX_NVIC_SetPendingIRQ(IRQn_Type IRQn);
void     CORTEX_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
uint32_t CORTEX_NVIC_GetPriority(IRQn_Type IRQn);
void     CORTEX_NVIC_SetPriority(IRQn_Type IRQn, uint32_t Priority);
void     CORTEX_NVIC_SystemReset(void);
uint32_t CORTEX_SystemTick_Config(uint32_t TicksNum);

#ifdef __cplusplus
}
#endif

#endif /* __LIB_CORTEX_H */

/*********************************** END OF FILE ******************************/