随笔分类 - 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 ...
阅读全文
摘要:#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...
阅读全文

浙公网安备 33010602011771号