您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > stm32f10x.h头文件
/*********************************************************************************@filestm32f10x.h*@authorMCDApplicationTeam*@versionV3.5.0*@date11-March-2011*@briefCMSISCortex-M3DevicePeripheralAccessLayerHeaderFile.*Thisfilecontainsalltheperipheralregister'sdefinitions,bits*definitionsandmemorymappingforSTM32F10xConnectivityline,*Highdensity,Highdensityvalueline,Mediumdensity,*MediumdensityValueline,Lowdensity,LowdensityValueline*andXL-densitydevices.**Thefileistheuniqueincludefilethattheapplicationprogrammer*isusingintheCsourcecode,usuallyinmain.c.Thisfilecontains:*-Configurationsectionthatallowstoselect:*-Thedeviceusedinthetargetapplication*-Touseornottheperipheral’sdriversinapplicationcode(i.e.*codewillbebasedondirectaccesstoperipheral’sregisters*ratherthandriversAPI),thisoptioniscontrolledby*#defineUSE_STDPERIPH_DRIVER*-Tochangefewapplication-specificparameterssuchastheHSE*crystalfrequency*-Datastructuresandtheaddressmappingforallperipherals*-Peripheral'sregistersdeclarationsandbitsdefinition*-Macrostoaccessperipheral’sregistershardware********************************************************************************@attention**THEPRESENTFIRMWAREWHICHISFORGUIDANCEONLYAIMSATPROVIDINGCUSTOMERS*WITHCODINGINFORMATIONREGARDINGTHEIRPRODUCTSINORDERFORTHEMTOSAVE*TIME.ASARESULT,STMICROELECTRONICSSHALLNOTBEHELDLIABLEFORANY*DIRECT,INDIRECTORCONSEQUENTIALDAMAGESWITHRESPECTTOANYCLAIMSARISING*FROMTHECONTENTOFSUCHFIRMWAREAND/ORTHEUSEMADEBYCUSTOMERSOFTHE*CODINGINFORMATIONCONTAINEDHEREININCONNECTIONWITHTHEIRPRODUCTS.**h2center©COPYRIGHT2011STMicroelectronics/center/h2*******************************************************************************//**@addtogroupCMSIS*@{*//**@addtogroupstm32f10x*@{*/#ifndef__STM32F10x_H#define__STM32F10x_H#define__STM32F10x_MAP_H#ifdef__cplusplusexternC{#endif/**@addtogroupLibrary_configuration_section*@{*//*UncommentthelinebelowaccordingtothetargetSTM32deviceusedinyourapplication*/#if!defined(STM32F10X_LD)&&!defined(STM32F10X_LD_VL)&&!defined(STM32F10X_MD)&&!defined(STM32F10X_MD_VL)&&!defined(STM32F10X_HD)&&!defined(STM32F10X_HD_VL)&&!defined(STM32F10X_XL)&&!defined(STM32F10X_CL)/*#defineSTM32F10X_LD*//*!STM32F10X_LD:STM32Lowdensitydevices*//*#defineSTM32F10X_LD_VL*//*!STM32F10X_LD_VL:STM32LowdensityValueLinedevices*//*#defineSTM32F10X_MD*//*!STM32F10X_MD:STM32Mediumdensitydevices*//*#defineSTM32F10X_MD_VL*//*!STM32F10X_MD_VL:STM32MediumdensityValueLinedevices*//*#defineSTM32F10X_HD*//*!STM32F10X_HD:STM32Highdensitydevices*//*#defineSTM32F10X_HD_VL*//*!STM32F10X_HD_VL:STM32Highdensityvaluelinedevices*//*#defineSTM32F10X_XL*//*!STM32F10X_XL:STM32XL-densitydevices*//*#defineSTM32F10X_CL*//*!STM32F10X_CL:STM32Connectivitylinedevices*/#endif/*Tip:Toavoidmodifyingthisfileeachtimeyouneedtoswitchbetweenthesedevices,youcandefinethedeviceinyourtoolchaincompilerpreprocessor.-Low-densitydevicesareSTM32F101xx,STM32F102xxandSTM32F103xxmicrocontrollerswheretheFlashmemorydensityrangesbetween16and32Kbytes.-Low-densityvaluelinedevicesareSTM32F100xxmicrocontrollerswheretheFlashmemorydensityrangesbetween16and32Kbytes.-Medium-densitydevicesareSTM32F101xx,STM32F102xxandSTM32F103xxmicrocontrollerswheretheFlashmemorydensityrangesbetween64and128Kbytes.-Medium-densityvaluelinedevicesareSTM32F100xxmicrocontrollerswheretheFlashmemorydensityrangesbetween64and128Kbytes.-High-densitydevicesareSTM32F101xxandSTM32F103xxmicrocontrollerswheretheFlashmemorydensityrangesbetween256and512Kbytes.-High-densityvaluelinedevicesareSTM32F100xxmicrocontrollerswheretheFlashmemorydensityrangesbetween256and512Kbytes.-XL-densitydevicesareSTM32F101xxandSTM32F103xxmicrocontrollerswheretheFlashmemorydensityrangesbetween512and1024Kbytes.-ConnectivitylinedevicesareSTM32F105xxandSTM32F107xxmicrocontrollers.*/#if!defined(STM32F10X_LD)&&!defined(STM32F10X_LD_VL)&&!defined(STM32F10X_MD)&&!defined(STM32F10X_MD_VL)&&!defined(STM32F10X_HD)&&!defined(STM32F10X_HD_VL)&&!defined(STM32F10X_XL)&&!defined(STM32F10X_CL)#errorPleaseselectfirstthetargetSTM32F10xdeviceusedinyourapplication(instm32f10x.hfile)#endif#if!definedUSE_STDPERIPH_DRIVER/***@briefCommentthelinebelowifyouwillnotusetheperipheralsdrivers.Inthiscase,thesedriverswillnotbeincludedandtheapplicationcodewillbebasedondirectaccesstoperipheralsregisters*//*#defineUSE_STDPERIPH_DRIVER*/#endif/***@briefInthefollowinglineadjustthevalueofExternalHighSpeedoscillator(HSE)usedinyourapplicationTip:ToavoidmodifyingthisfileeachtimeyouneedtousedifferentHSE,youcandefinetheHSEvalueinyourtoolchaincompilerpreprocessor.*/#if!definedHSE_VALUE#ifdefSTM32F10X_CL#defineHSE_VALUE((uint32_t)25000000)/*!ValueoftheExternaloscillatorinHz*/#else#defineHSE_VALUE((uint32_t)8000000)/*!ValueoftheExternaloscillatorinHz*/#endif/*STM32F10X_CL*/#endif/*HSE_VALUE*//***@briefInthefollowinglineadjusttheExternalHighSpeedoscillator(HSE)StartupTimeoutvalue*/#defineHSE_STARTUP_TIMEOUT((uint16_t)0x0500)/*!TimeoutforHSEstartup*/#defineHSI_VALUE((uint32_t)8000000)/*!ValueoftheInternaloscillatorinHz*//***@briefSTM32
本文标题:stm32f10x.h头文件
链接地址:https://www.777doc.com/doc-5644987 .html