foggia2004

2016年1月29日

STM32之延时秒,毫秒,微秒

摘要: #include "delay.h" #include "stdint.h" #include "stm32f10x.h" static uint8_t fac_us=0; //us延时倍乘数 static uint16_t fac_ms=0; //ms延时倍乘数 void DelayInit() 阅读全文

posted @ 2016-01-29 11:39 foggia2004 阅读(10619) 评论(0) 推荐(0) 编辑

STM32之GPIO端口位带操作

摘要: #ifndef __SYS_H #define __SYS_H #include "stm32f10x.h" //位带操作 //把“位带地址+位序号”转换别名地址宏 #define BITBAND(addr, bitnum) ((addr & 0xF0000000)+0x2000000+((addr 阅读全文

posted @ 2016-01-29 11:07 foggia2004 阅读(2088) 评论(0) 推荐(0) 编辑

导航