墨刑的英文译语怎么说-怪物总动员
2023年3月30日发(作者:businessman)
/**
******************************************************************************
*@fileTIM/6Steps/main.c*@authorMCDApplicationTeam*@versionV3.5.0
*@date08-April-2011*@briefMainprogrambody
******************************************************************************
*@attention*
*THEPRESENTFIRMWAREWHICHISFORGUIDANCEONLYAIMSATPROVIDINGCUSTOMERS
*WITHCODINGINFORMATIONREGARDINGTHEIRPRODUCTSINORDERFORTHEMTOSAVE
*ULT,STMICROELECTRONICSSHALLNOTBEHELDLIABLEFORANY
*DIRECT,INDIRECTORCONSEQUENTIALDAMAGESWITHRESPECTTOANYCLAIMSARISING
*FROMT两小儿辩日文言文拼音 HECONTENTOFSUCHFIRMWAREAND/ORTHEUSEMADEBYCUSTOMERSOFTHE
*CODINGINFORMATIONCONTAINEDHEREININCONNECTIONWITHTHEIRPRODUCTS.*
*
©COPYRIGHT2011STMicroelectronics
******************************************************************************
*/
/*Includes------------------------------------------------------------------*/#include\"stm32f10x.h\"
/**@addtogroupSTM32F10x_StdPeriph_Examples*@{*/
/**@addtogroupTIM_6Steps*@{*/
/*Privatetypedef-----------------------------------------------------------*//*Privatedefine-------------------
-----------------------------------------*//*Privatemacro-------------------------------------------------------------
*/
/*Privatevariables---------------------------------------------------------*/TIM_TimeBaseInitTypeDefTIM
_TimeBaseStructure;TIM_OCInitTypeDefTIM_OCInitStructure;TIM_BDTRInitTypeDefTIM_BDTR
InitStructure;uint16_tCCR1_Val=32767;uint16_tCCR2_Val=24575;uint16_tCCR3_Val=1638
3;uint16_tCCR4_Val=8191;
/*Privatefunctionprototypes-----------------------------------------------*/voidRCC_Configuration(vo东周列国春秋篇 id
);voidGPIO_Configuration(void);v妮的意思 oidSysTick_Configuration(void);voidNVIC_Configuration(void
);
/*Privatefunctions---------------------------------------------------------*//**
*@briefMainprogram*@paramNone*@retvalNone*/
intmain(void){
/*!
hSystemInit()functionwhichiscalledfromstartupfile(startup_stm32f10x_xx.s)beforetobr
nfigurethedefaultsettingofSystemInit()function,referto
system_*/
/*SystemClocksConfiguration*/RCC_Configuration();
/*NVICConfiguration*/NVIC_Configuration();
/*GPIOConfiguration*/GPIO_Configuration();
/*SysTickConfiguration*/SysTick_Configuration();
/*-----------------------------------------------------------------------------
TheSTM32F10xTIM1peripheraloffersthepossibilitytoprograminadvancetheconfigurationf
orthenextTIM1outputsbehaviour(step)andchangetheconfigurationofallthechannelsatth
erationispossiblewhentheCOM(commutation)eventisused.
TheCOMeventcanbegeneratedbysoftwarebysettingtheCOMbitintheTIM1_EGRregister
orbyhardware(onTRCrisingedge).
Inthisexample,asoftwareCOMeventisgeneratedeach100ms:usingtheSystickinterrupt.
TheTIM1isconfiguredinTimingMode,eachtimeaCOMeventoccurs,anewTIM1configurat
ionwillbesetinadvance.
ThefollowingTabledescribestheTIM1Channelsstates:------------------------------------------
-----|Step1|Step2|Step3|Step4|Step5|Step6|------------------------------------有关月亮的诗句及赏析 ----------
------------
|Channel1|1|0|0|0|0|1|----------------------------------------------------------
|Channel1N|0|0|1|1|0|0|----------------------------------------------------------
|Channel2|0|0|0|1|1|0|----------------------------------------------------------
|Channel2N|1|1|0|0|0|0|----------------------------------------------------------
|Channel3|0|1|1|0|0|0|----------------------------------------------------------
|Channel3N|0|0|0|0|1|1|----------------------------------------------------------
-----------------------------------------------------------------------------*/
/*TimeBaseconfiguration*/
TIM__Prescaler=0;
TIM__CounterMode=TIM_CounterMode_Up;TIM_TimeBaseStructure.
TIM_Period=4095;TIM__ClockDivision=0;TIM_
M_RepetitionCounter=0;
TIM_TimeBaseInit(TIM1,&TIM_TimeBaseStructure);
/*Channel1,2,3and4ConfigurationinPWMmode*/
TIM__OCMode=TIM_OCMode_Timing;TIM__Output
State=TIM_OutputState_Enable;TIM__OutputNState=TIM_OutputNState
_Enable;TIM__Pulse=2047;
TIM__OCPolarity=TIM_OCPolarity_High;TIM__OCNP
olarity=TIM_OCNPolarity_High;
TIM__OCIdleState=TIM_OCIdleState_Set;TIM__OCNIdl
eState=TIM_OCNIdleState_Set;
TIM_OC1Init(TIM1,&TIM_OCInitStructure);
TIM__Pulse=1023;
TIM_OC2Init(TIM1,&TIM_OCInitStructure);
TIM__Pulse=511;
TIM_OC3Init(TIM1,&TIM_OCInitStructure);
/*AutomaticOutputenable,Break,deadtimeandlockconfiguration*/TIM_BDTRInitStructure
.TIM_OSSRState=TIM_OSSRState_Enable;TIM__OSSIState=TIM_OSSISt
ate_Enable;TIM__LOCKLevel=TIM_LOCKLevel_OFF;TIM_BDTRInitStruc
_DeadTime=1;
TIM__Break=TIM_Break_Enable;
TIM__BreakPolarity=TIM_BreakPolarity_High;
TIM__AutomaticOutput=TIM_AutomaticOutput_Enable;
TIM_BDTRConfig(TIM1,&TIM_BDTRInitStructure);
TIM_CCPreloadControl(TIM1,ENABLE);
TIM_ITConfig(TIM1,TIM_IT_COM,ENABLE);
/*TIM1counterenable*/TIM_Cmd(TIM1,ENABLE);
/*MainOutputEnable*/
TIM_CtrlPWMOutputs(TIM1,ENABLE);
while(1){}}/**
*@briefConfiguresthedifferentsystemclocks.*@paramNone*@retvalNone*/
voidRCC_Configuration(void){
/*TIM1,GPIOA,GPIOB,GPIOEandAFIOclocksenable*/
RCC_APB2PeriphClockCmd(RCC_APB2Periph_TIM1|RCC_APB2Periph_GPIOA|RCC_APB2Periph
_GPIOE|
RCC_APB2Periph_GPIOB|RCC_APB2Periph_AFIO,ENABLE);}/**
*@briefConfiguretheTIM1Pins.*@paramNone*@retvalNone*/
voidGPIO_Configuration(void){
GPIO_InitTypeDefGPIO_InitStructure;
/*GPIOEConfiguration:Channel1/1N,2/2N,3/3Nasalternatefunctionpush-pull*/GPIO_Init
_Pin=GPIO_Pin_9|GPIO_Pin_11|GPIO_Pin_13|GPIO_Pin_8|G
PIO_Pin_10|GPIO_Pin_12;GPIO__Mode=GPIO_Mode_AF_PP;GPIO_InitStr
_Speed=GPIO_Speed_50MHz;
GPIO_Init(GPIOE,&GPIO_InitStructure);
/*GPIOEConfiguration:BKINpin*/
GPIO__Pin=GPIO_Pin_15;
GPIO__Mode=GPIO_Mode_IN_FLOATING;GPIO__Speed
=GPIO_Speed_50MHz;
GPIO_Init(GPIOE,&GPIO_InitStructure);
/*TIM1Fullremappin兵马俑 gpins*/
GPIO_PinRemapConfig(GPIO_FullRemap_TIM1,ENABLE);}/**
*@briefConfigurestheSysTick.*@paramNone*@retvalNone*/
voidSysTick_Configuration(void){
/*SetupSysTickTimerfor100msecinterrupts*/if(SysTick_Config((SystemCoreClock)/10)){
/*Captureerror*/while(1);}
NVIC_SetPriority(SysTick_IRQn,0x0);}/**
*@briefConfiguresthenestedvectoredinterruptcontroller.*@paramNone*@retvalNon
e*/
voidNVIC_Configuration(void){
NVIC_InitTypeDefNVIC_InitStructure;
/*EnabletheTIM1Interrupt*/
NVIC__IRQChannel=TIM1_TRG_COM_IRQn;
NVIC__IRQChannelPreemptionPriority=0;NVIC__IRQCha
nnelSubPriority=1;NVIC__IRQChannelCmd=ENABLE;NVIC_Init(&NVIC_Init
Structure);}
#ifdefUSE_FULL_ASSERT/**
*@briefReportsthenameofthesourcefileandthesourcelinenumber*wheretheasse
rt_paramerrorhasoccurred.*@paramfile:pointertothesourcefilename
*@paramline:assert_paramerrorlinesourcenumber*@retvalNone*/
voidassert_failed(uint8_t*file,uint32_tline){
/*Usercanaddhisownimplementationtoreportthefilenameandlinenumber,ex:printf(\"
Wrongparametersvalue:file%so老鼠偷油的故事 nline%drn\",file,line)*/
while(1){}}
#endif/***@}*//***@}*/
/*******************(C)COPYRIGHT2011STMicroelectronics*****ENDOFFILE****//**
********************************诗经全书共有多少篇 **********************************************
*@fileTIM/6Steps/stm32f10x_it.c*@authorMCDApplicationTeam*@versionV3.5.0
*@date08-April-2011
*@briefMainInterruptServiceRoutines.
*Thisfileprovidestemplateforallexceptionshandlerandperipherals*interruptser
viceroutine.
******************************************************************************
*@attention*
*THEPRESENTFIRMWAREWHICHISFORGUIDANCEONLYAIMSATPROVIDINGCUSTOMERS
*WITHCODINGINFORMATIONREGARDINGTHEIRPRODUCTSINORDERFORTHEMTOSAVE
*ULT,STMICROELECTRONICSSHALLNOTBEHELDLIABLEFORANY
*DIRECT,INDIRECTORCONSEQUENTIALDAMAGESWITHRESPECTTOANYCLAIMSARISING
*FROMTHECONTENTOFSUCHFIRMWAREAND/ORTHEUSEMADEBYCUSTOMERSOFTHE
*CODINGINFORMATIONCONTAINEDHEREININCONNECTIONWITHTHEIRPRODUCTS.*
*
©COPYRIGHT2011STMicroelectronics
******************************************************************************
*/
/*Includes------------------------------------------------------------------*/#include\"stm32f10x_it.h\"
/**@addtogroupSTM32F10x_StdPeriph_Examples*@{*/
/**@addtogroupTIM_6Steps*@{*/
/*Privatetypedef-----------------------------------------------------------*//*Privatedefine-------------------
-----------------------------------------*//*Privatemacro-------------------------------------------------------------
*//*Privatevariables---------------------------------------------------------*/__IOuint32_tstep=1;
/*Privatefunctionprototypes-----------------------------------------------*//*Privatefunctions-----------
----------------------------------------------*/
/******************************************************************************
/
/*Cortex-M3ProcessorExceptionsHandlers*//***********************
*******************************************************//**
*@briefThisfunctionhandlesNMIexception.*@paramNone*@retvalNone*/
voidNMI_Handler(void){}/**
*@briefThisfunctionhandlesHardFaultexception.*@paramNone*@retvalNone*/
voidHardFault_Handler(void){
/*GotoinfiniteloopwhenHardFaultexceptionoccurs*/while(1){}}/**
*@briefThisfunctionhandlesMemoryManageexception.*@paramNone*@retvalNone
*/
voidMemManage_Handler(void){
/*GotoinfiniteloopwhenMemoryManageexceptionoccurs*/while(1){}}/**
*@briefThisfunctionhandlesBusFaultexception.*@paramNone*@retvalNone*/
voidBusFault_Handler(void){
/*GotoinfiniteloopwhenBusFaultexceptionoccurs*/while(1){}}/**
*@briefThisfunctionhandlesUsageFaultexception.*@paramNone*@retvalNone*/
voidUsageFault_Handler(void){
/*GotoinfiniteloopwhenUsageFaultexceptionoccurs*/while(1){}}/**
*@briefThisfunctionhandlesDebugMonitorexception.*@paramNone*@retvalNone*
/
voidDebugMon_Handler(void){}/**
*@briefThisfunctionhandlesSVCallexception.*@paramNone*@retvalNone*/
voidSVC_Handler(void){}/**
*@briefThisfunctionhandlesPendSV_Handlerexception.*@paramNone*@retvalNone
*/
voidPendSV_Handler(void){}/**
*@briefThisfunctionhandlesSysTickHandler.*@paramNone*@retvalNone*/
voidSysTick_Handler(void){
/*GenerateTIM1COMeventbysoftware*/
TIM_GenerateEvent(TIM1,TIM_EventSource_COM);}
/******************************************************************************
/
/*STM32F10xPeripheralsInterruptHandlers*//***********************
*******************************************************//**
*@briefThisfunctionhandlesTIM1Triggerandcommutationinterrupts*requests.*@par
amNone
*@retvalNone*/
voidTIM1_TRG_COM_IRQHandler(void){
/*ClearTIM1COMpendingbit*/
TIM_ClearITPendingBit(TIM1,TIM_IT_COM);
if(step==1){
/*Nextstep:Step2Configuration----------------------------*//*Channel3configuration*/
TIM_CCxCmd(TIM1,TIM_Channel_3,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel
_3,TIM_CCxN_Disable);
/*Channel1configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_1,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM_C
hannel_1,TIM_CCx_Enable);TIM_CCxNCmd(TIM1,TIM_Channel_1,TIM_CCxN_Disable);
/*Channel2configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_2,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM_C
hannel_2,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_2,TIM_CCxN_Enable);ste
p++;}
elseif(step==2){
/*Nextstep:Step3Configuration----------------------------*//*Channel2configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_2,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM_C
hannel_2,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_2,TIM_CCxN_Enable);
/*Channel3configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_3,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM_C
hannel_3,TIM_CCx_Enable);
TIM_CCxNCmd(TIM1,TIM_Channel_3,TIM_CCxN_Disable);
/*Channel1configuration*/
TIM_CCxCmd(TIM1,TIM_Channel_1,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel
_1,TIM_CCxN_Disable);step++;}
elseif(step==3){
/*Nextstep:Step4Configuration----------------------------*//*Channel3configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_3,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_3,TIM_CCx_Enable);TIM_CCxNCmd(TIM1,TIM_Channel_3,TIM_CCxN_Disable);
/*Channel2configuration*/
TIM_CCxCmd(TIM1,TIM_Channel_2,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Chann
el_2,TIM_CCxN_Disable);
/*Channel1configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_1,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_1,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_1,TIM_CCxN_Enable);s
tep++;}
elseif(step==4){
/*Nextstep:Step5Configuration----------------------------*//*Channel3configuration*/
TIM_CCxCmd(TIM1,TIM_Channel_3,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Chann
el_3,TIM_CCxN_Disable);
/*Channel1configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_1,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_1,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_1,TIM_CCxN_Enable);
/*Channel2configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_2,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_2,TIM_CCx_Enable);TIM_CCxNCmd(TIM1,TIM_Channel_2,TIM_CCxN_Disable);s
tep++;}
elseif(step==5){
/*Nextstep:Step6Configuration----------------------------*//*Channel3configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_3,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_3,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_3,TIM_CCxN_Enable);
/*Channel1configuration*/
TIM_CCxCmd(TIM1,TIM_Channel_1,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Chann
el_1,TIM_CCxN_Disable);
/*Channel2configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_2,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_2,TIM_CCx_Enable);TIM_CCxNCmd(TIM1,TIM_Channel_2,TIM_CCxN_Disable);s
tep++;}else{
/*Nextstep:Step1Configuration----------------------------*//*Channel1configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_1,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_1,TIM_CCx_Enable);TIM_CCxNCmd(TIM1,TIM_Channel_2,TIM_CCxN_Disable);
/*Channel3configuration*/
TIM_SelectOCxM(TIM1,TIM_Channel_3,TIM_OCMode_PWM1);TIM_CCxCmd(TIM1,TIM
_Channel_3,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Channel_3,TIM_CCxN_Enable);
/*Channel2configura初中文言文实词虚词归纳整理 tion*/
TIM_CCxCmd(TIM1,TIM_Channel_2,TIM_CCx_Disable);TIM_CCxNCmd(TIM1,TIM_Chann
el_2,TIM_CCxN_Disable);step=1;}}
/****************************************************************************
**/
/*STM32F10xPeripheralsInterruptHandlers*//*AddheretheInterrupt
Handlerfortheusedperipheral(s)(PPP),forthe*//*availableperipheralinterrupthandler\'sna
mepleaserefertothestartup*/
/*file(startup_stm32f10x_xx.s).*/
/****************************************************************************
**//**
*@briefThisfunctionhandlesPPPinterruptrequest.*@paramNone*@retvalNone*/
/*voidPPP_IRQHandler(void){}*//***@}*//***@}*/
/*******************(C)COPYRIGHT2011STMicroelectronics*****ENDOFFILE****/
更多推荐
channel是什么意思nnel的用法读音典
发布评论