first commit
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
#ifndef __BSP_H__
|
||||
#define __BSP_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);
|
||||
void LedToggle(uint8_t Chnl);
|
||||
|
||||
//Interrupt
|
||||
void IrqInit(void);
|
||||
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
|
||||
void DelayConfig(void);
|
||||
unsigned int DwtCntGet(void);
|
||||
void DelayUs(unsigned int Us);
|
||||
void DelayMs(unsigned int Ms);
|
||||
|
||||
/* GPIO */
|
||||
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 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"
|
||||
//
|
||||
// /* SHELL头文件 */
|
||||
// #include "LetterShell.h"
|
||||
//
|
||||
// /* BSP版本 */
|
||||
// #define VERSION_0 0
|
||||
// #define VERSION_1 1
|
||||
// #define VERSION_2 2
|
||||
//
|
||||
// /* RTOS宏开关 */
|
||||
// #ifdef USE_RTOS
|
||||
// #ifdef USE_THREADX
|
||||
// #include "tx_api.h"
|
||||
// #endif
|
||||
// #endif
|
||||
//
|
||||
//
|
||||
// //System
|
||||
// void BspInit(void);
|
||||
// void BspExtraInit(void);
|
||||
// void SystemStart(void);
|
||||
// void BspSystemReboot(void);
|
||||
//
|
||||
// void SystemGpioInit(void);
|
||||
// void GpioConfig(GPIO_TypeDef *GpioX, uint16_t GpioPinX,GPIOMode_TypeDef GpioMode, GPIOSpeed_TypeDef GpioSpeed);
|
||||
// void GpioSetSts(GPIO_TypeDef *GpioX, uint16_t GpioPinX, uint8_t Status);
|
||||
// uint8_t GpioGetSts(GPIO_TypeDef *GpioX, uint16_t GpioPinX);
|
||||
// void LedToggle(uint8_t Chnl);
|
||||
// void LedOff(uint8_t Chnl);
|
||||
// void LedOn(uint8_t Chnl);
|
||||
//
|
||||
//
|
||||
//
|
||||
// //Usart
|
||||
// void SystemUsartInit(void);
|
||||
// void UsartSendChar(uint32_t ComId,uint8_t Data);
|
||||
// void UsartSendStr(uint32_t ComId,uint8_t* Data, uint64_t Len);
|
||||
// uint8_t UsartReceiveChar(uint32_t ComId);
|
||||
// void UsartStdConfig(uint32_t ComId, uint32_t baud);
|
||||
// void UsartAdvConfig(uint32_t ComId, uint32_t baud, uint8_t DataBits, uint8_t StopBits, uint8_t Parity);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user