随笔分类 -  STM32常用代码片断

STM32常用代码片断
摘要:static int hal_readSector(uint32 sec, uint32 *pdata) { uint32 saddr; int i; saddr = (defStartSector+sec)*defSectorSize; for(i=0;iACR&=~(1ACR|=1<<10; //FLASH enable code fetch ... 阅读全文
posted @ 2017-04-13 14:44 lort 阅读(1092) 评论(0) 推荐(0)
摘要:#include "Type.h" #include "IIC.h" #include "Delay.h" void I2C_Init(void) { GPIO_InitTypeDef GPIO_InitStructer; RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); GPIO_InitStructer.GPI... 阅读全文
posted @ 2017-01-03 16:57 lort 阅读(384) 评论(0) 推荐(0)