串口和中断写完
This commit is contained in:
+18
-14
@@ -2,7 +2,13 @@
|
||||
#define __BSP_H__
|
||||
|
||||
#include "VoiletTypeDef.h"
|
||||
#include "Voilet.h"
|
||||
|
||||
/* Extra Library Enable */
|
||||
#define USE_SHELL //系统使用Shell
|
||||
|
||||
#ifdef USE_SHELL
|
||||
#include "LetterShell.h"
|
||||
#endif
|
||||
|
||||
#define ARRAY_LEN(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
@@ -26,12 +32,17 @@ typedef enum {
|
||||
void VoiletBspInit(void);
|
||||
|
||||
/* BSP */
|
||||
void AllPeriphClockDisable(void);
|
||||
void LedOn(uint8_t Chnl);
|
||||
void LedOff(uint8_t Chnl);
|
||||
void LedSet(uint8_t Chnl,uint8_t Value);
|
||||
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 IrqDisable(uint32_t Irq);
|
||||
|
||||
//System Delay
|
||||
void DelayConfig(void);
|
||||
unsigned int DwtCntGet(void);
|
||||
@@ -39,18 +50,16 @@ void DelayUs(unsigned int Us);
|
||||
void DelayMs(unsigned int Ms);
|
||||
|
||||
/* GPIO */
|
||||
void GpioClockEnable(const GPIO_MAP_T *GpioX);
|
||||
void GpioConfig(const GPIO_MAP_T *GpioX, GPIOMode_TypeDef GpioMode, GPIOSpeed_TypeDef GpioSpeed);
|
||||
void GpioSet(const GPIO_MAP_T *GpioX, uint8_t Value);
|
||||
unsigned char GpioGet(const GPIO_MAP_T *GpioX);
|
||||
|
||||
/* UART */
|
||||
void UartClockEnable(const COM_MAP_T *ComX);
|
||||
// void UartSendChar(uint32_t ComId,uint8_t Data);
|
||||
// void UartSendStr(uint32_t ComId,uint8_t* Data, uint64_t Len);
|
||||
// void UartStdConfig(COM_MAP_T ComX, uint32_t baud);
|
||||
// void UartAdvConfig(const COM_MAP_T *ComX, uint32_t baud, uint8_t DataBits, uint8_t StopBits, uint8_t Parity);
|
||||
// #define UartStdConfig(ComX, baud) UartStdConfig((COM_MAP_T)ComX, baud)
|
||||
void ComSendChar(const COM_MAP_T *ComX,uint8_t Data);
|
||||
void ComSendStr(const COM_MAP_T *ComX,uint8_t* Data, uint64_t Len);
|
||||
uint8_t ComReceiveChar(const COM_MAP_T *ComX);
|
||||
void ComStdConfig(const COM_MAP_T *ComX, uint32_t Baud);
|
||||
void ComAdvConfig(const COM_MAP_T *ComX, uint32_t Baud, uint8_t DataBits, uint8_t StopBits, uint8_t Parity);
|
||||
|
||||
// /* 板级BSP头文件 */
|
||||
// #include "Board.h"
|
||||
@@ -86,11 +95,6 @@ void UartClockEnable(const COM_MAP_T *ComX);
|
||||
// void LedOn(uint8_t Chnl);
|
||||
//
|
||||
//
|
||||
// //Interrupt
|
||||
// void SystemInterruptInit(void);
|
||||
// void InterruptRegister(uint32_t Irqn, void(*Func)(uint32_t));
|
||||
// void InterruptSetLevel(uint32_t Vector, uint8_t NvicPrePriority, uint8_t NvicSubPriority);
|
||||
// void InterruptDisable(uint32_t Vector);
|
||||
//
|
||||
// //Usart
|
||||
// void SystemUsartInit(void);
|
||||
|
||||
Reference in New Issue
Block a user