stm32f10x_fsmc.cpp
来自「STM32 USB HID」· C++ 代码 · 共 27 行
CPP
27 行
#include"stm32f10x_fsmc.hpp"
//-----------------------------------------------------------------------------
stm32f10x_fsmc::stm32f10x_fsmc(void)
{
unsigned int temp=(unsigned int)&dword;
temp-=0x20000000;
temp<<=5;
temp+=0x22000000;
this->bits=(unsigned int*)temp;
this->BCR1=(volatile unsigned long*)0xa0000000;
this->BCR2=(volatile unsigned long*)0xa0000008;
this->BCR3=(volatile unsigned long*)0xa0000010;
this->BCR4=(volatile unsigned long*)0xa0000018;
}
//-----------------------------------------------------------------------------
void stm32f10x_fsmc::Configration()
{
this->dword=0;
this->bits[WREN]=1;
this->bits[MWID_1]=0;
this->bits[MWID_0]=1;
this->BCR3[0]=dword;
}
//-----------------------------------------------------------------------------
stm32f10x_fsmc FSMC;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?