Files
new_f_3/User/bsp/bsp.h
刘正航 609eb878d1 New
2026-04-16 16:55:01 +08:00

84 lines
1.8 KiB
C

/*
*********************************************************************************************************
*
* 模块名称 : BSP模块
* 文件名称 : bsp.h
* 说 明 : 这是底层驱动模块所有的h文件的汇总文件。 应用程序只需 #include bsp.h 即可,
* 不需要#include 每个模块的 h 文件
*
* Copyright (C), 2013-2014, 安富莱电子 www.armfly.com
*
*********************************************************************************************************
*/
#ifndef _BSP_H_
#define _BSP_H_
#define STM32_V4
//#define STM32_X2
/* 检查是否定义了开发板型号 */
#if !defined (STM32_V4) && !defined (STM32_X2)
#error "Please define the board model : STM32_X2 or STM32_V4"
#endif
/* 定义 BSP 版本号 */
#define __STM32F1_BSP_VERSION "1.1"
/* CPU空闲时执行的函数 */
//#define CPU_IDLE() bsp_Idle()
/* 开关全局中断的宏 */
#define ENABLE_INT() __set_PRIMASK(0) /* 使能全局中断 */
#define DISABLE_INT() __set_PRIMASK(1) /* 禁止全局中断 */
/* 这个宏仅用于调试阶段排错 */
#define BSP_Printf printf
//#define BSP_Printf(...)
#include "stm32f10x.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
//#include "bsp_led.h"
#include "bsp_timer.h"
#include "bsp_key.h"
#include "bsp_usart_dma.h"
#include "bsp_tim_pwm.h"
#include "bsp_beep.h"
#include "bsp_digital_tube.h"
#include "bsp_i2c_gpio.h"
#include "bsp_eeprom_24xx.h"
#include "bsp_drv8880.h"
#include "bsp_step_moto.h"
//#include "bsp_adc.h"
//#include "sys.h" /* 底层硬件驱动 */
//uint8_t Flag_100ms;
extern uint8_t Flag_100ms;
extern uint32_t RxCount ;
extern uint32_t TxCount ;
/* 提供给其他C文件调用的函数 */
void bsp_Init(void);
void bsp_Idle(void);
#define MAX_SPEED 400
#define STEP_PER_LAP 8461
#endif
/***************************** 安富莱电子 www.armfly.com (END OF FILE) *********************************/