Image
Image

喂什么玩意

+ 关注

粉丝 0     |     主题 40     |     回帖 645

基于指南者STM32_入门
2024-3-31 21:48
  • ST MCU
  • 59
  • 9158
  #include "stm32f10x.h" //相当于51单片机中的 #inclulde #include "bsp_led.h" #include "bsp_key.h" #d ...  
  位带操作公式(※) ((GPIOB_ODR_Addr & 0xF0000000)+0x02000000+((GPIOB_ODR_Addr & 0x00FFFFFF)  
  固件库按键检测 具体看历程 位带操作 GPIOB->ODR |= 0  
  #include "stm32f10x.h" //相当于51单片机中的 #inclulde #include "bsp_led.h" int main(void) { //来 ...  
  #ifndef _BSP_LED_H #define _BSP_LED_H #include "stm32f10x.h" #define LED_G_GPIO_PIN GPIO_Pin_0 # ...  
  固件库点灯 //bsp: board support package #include "bsp_led.h" void LED_GPIO_Config(void) { GPIO_In ...  
  并添加H文件路径,KEIL 默认在安装目录添加路径(X)  
  最后添加IDE 定义: USE_STDPERIPH_DRIVER,STM32F10X_HD •STM32F10X_HD 宏:为了告诉 STM32 标准库,我们 ...  
  接下来在keil project里面添加汇编文件和C文件:  
  复制【固件库】STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Template中的3文件到USER,并 ...  
  新建工程_固件库 1, 创建文件夹 Project Libraries User Doc 2, 复制固件库里Libraries的CMSIS和STM32F10x ...  
  专门存放中断服务函数的C文件 ​ stm32f10x_it.c ​ stm32f10x_it.h ​ 中断服务函数可以放在其他地方, ...  
  初始固件库 1, 汇编编写的启动文件 ​ startup_stm32f10x_hd.s:设置堆栈指针, 设置PC指针,初始化中断向量 ...  
  #include "stm32f10x.h" #include "stm32f10x_gpio.h" #define LEDG_GPIO_PORT GPIOB #define LEDG_GPIO_C ...  
  #include "stm32f10x_gpio.h" void GPIO_SetBits(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) { GPIOx->BSR ...  
  SUM_UP #ifndef _STM32F10X_GPIO_H #define _STM32F10X_GPIO_H #include "stm32f10x.h" #define GPIO_Pin ...  
  #include "stm32f10x.h" #include "stm32f10x_gpio.h" int main (void) { #if 0 //打开GPIOB端口的时钟 ...  
  #include "stm32f10x_gpio.h" void GPIO_SetBits(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) { GPIOx->BSR ...  
  寄存器点灯_IO初始化 #ifndef _STM32F10X_GPIO_H #define _STM32F10X_GPIO_H #include "stm32f10x.h" #de ...  
  #include "stm32f10x.h" #include "stm32f10x_gpio.h" int main (void) { #if 0 //打开GPIOB端口的时钟 ...  
2
3
近期访客