45 lines
573 B
C
45 lines
573 B
C
#pragma once
|
|
|
|
#include <sys/types.h>
|
|
#include "bsp/gpio.h"
|
|
#include "bsp/time.h"
|
|
#include "bsp/spi.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
|
|
/* USER INCLUDE BEGIN */
|
|
|
|
/* USER INCLUDE END */
|
|
|
|
/* USER DEFINE BEGIN */
|
|
|
|
/* USER DEFINE END */
|
|
/* bsp层外设API结构体 */
|
|
struct Bsp_s {
|
|
struct {
|
|
|
|
int8_t ( *WritePin )( BSP_GPIO_t gpio, bool value );
|
|
}gpio;
|
|
|
|
struct {
|
|
void ( *Init )( );
|
|
}timer_t;
|
|
|
|
struct {
|
|
void ( *Init )( );
|
|
}spi;
|
|
};
|
|
|
|
extern const struct Bsp_s Bsp;
|
|
|
|
/* USER FUNCTION BEGIN */
|
|
|
|
/* USER FUNCTION END */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |