优化中断
This commit is contained in:
+7
-31
@@ -1,37 +1,13 @@
|
||||
#ifndef __BSP_H__
|
||||
#define __BSP_H__
|
||||
|
||||
#include "VoiletTypeDef.h"
|
||||
|
||||
/* Extra Library Enable */
|
||||
#define USE_SHELL //系统使用Shell
|
||||
|
||||
#ifdef USE_SHELL
|
||||
#include "LetterShell.h"
|
||||
#endif
|
||||
|
||||
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
/* BOOL类型定义 */
|
||||
typedef enum {
|
||||
false = 0,
|
||||
true = 1,
|
||||
} bool_t;
|
||||
|
||||
//GPIO
|
||||
//数组信号输入/出开关
|
||||
#define DI_ON 1
|
||||
#define DI_OFF 0
|
||||
#define DO_ON 1
|
||||
#define DO_OFF 0
|
||||
//LED灯开关
|
||||
#define LED_ON 0
|
||||
#define LED_OFF 1
|
||||
|
||||
/* Voilet */
|
||||
void VoiletBspInit(void);
|
||||
/* Voilet Bsp */
|
||||
#include "VoiletPort.h"
|
||||
/* Board */
|
||||
#include "Board.h"
|
||||
|
||||
/* BSP */
|
||||
void BspInit(void);
|
||||
void LedOn(uint8_t Chnl);
|
||||
void LedOff(uint8_t Chnl);
|
||||
void LedSet(uint8_t Chnl,uint8_t Value);
|
||||
@@ -39,8 +15,8 @@ void LedToggle(uint8_t Chnl);
|
||||
|
||||
//Interrupt
|
||||
void IrqInit(void);
|
||||
void IrqRegister(unsigned int Irq, void(*Func)(void *Param));
|
||||
void IrqConfig(uint32_t Irq, uint8_t NvicPrePriority, uint8_t NvicSubPriority);
|
||||
void IrqRegister(unsigned char Irqn,void(*Func)(void *Param));
|
||||
void IrqEnable(uint32_t Irq, uint8_t NvicPrePriority, uint8_t NvicSubPriority);
|
||||
void IrqDisable(uint32_t Irq);
|
||||
|
||||
//System Delay
|
||||
|
||||
Reference in New Issue
Block a user