2010-09-01 05:05 AM
Merging flags with OR Standard peripheral library.
2011-05-17 05:04 AM
Why not check the source code, and decide for yourself?
2011-05-17 05:04 AM
It is only ''safe'' in so far as you ensure that the ''merged'' value is valid & meaningful in each specific case...
2011-05-17 05:05 AM
''THIS PARAMETER CAN BE ANY COMBINATION OF THE FOLLOWING''
/******************************************************************************* * Function Name : TIM_ClearITPendingBit * Description : Clears the TIMx's interrupt pending bits. * Input : - TIMx: where x can be 1 to 8 to select the TIM peripheral. * - TIM_IT: specifies the pending bit to clear. * This parameter can be any combination of the following values: * - TIM_IT_Update: TIM1 update Interrupt source * - TIM_IT_CC1: TIM Capture Compare 1 Interrupt source * - TIM_IT_CC2: TIM Capture Compare 2 Interrupt source * - TIM_IT_CC3: TIM Capture Compare 3 Interrupt source * - TIM_IT_CC4: TIM Capture Compare 4 Interrupt source * - TIM_IT_COM: TIM Commutation Interrupt * source * - TIM_IT_Trigger: TIM Trigger Interrupt source * - TIM_IT_Break: TIM Break Interrupt source * Output : None * Return : None *******************************************************************************/ void TIM_ClearITPendingBit(TIM_TypeDef* TIMx, u16 TIM_IT) { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_PERIPH_IT(TIMx, TIM_IT)); /* Clear the IT pending Bit */ TIMx->SR = (u16)~TIM_IT; } The example sources are replete withRCC_APB2PeriphClockCmd()
enabling multiple clocks. The bloody awful forum software is from Microsoft.2011-05-17 05:05 AM
Thank you. I guess I am skiping some informations when reading chm manual:
This parameter can be any combination of the following values.And I always did check code and uc documentation to check if I can do this. And than even asked this obvious question. Argghh I'm sorry.
Regards
Thomas
2011-05-17 05:05 AM
User litom said, ''This forum editor drive me nuts'';
User clive1 said, ''bloody awful forum software''. Agreed! See: [DEAD LINK /public/STe2ecommunities/e2esupport/Lists/Functionality%20issues/Flat.aspx?RootFolder=/public/STe2ecommunities/e2esupport/Lists/Functionality issues/Probably the worst forum software in the world&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000C1184011A4DEFF4BA0E41441DCAEC568&TopicsView=https://my.st.com/public/STe2ecommunities/e2esupport/Lists/Functionality%2520issues/AllItems.aspx¤tviews=0]https://my.st.com/public/STe2ecommunities/e2esupport/Lists/Functionality%20issues/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fe2esupport%2fLists%2fFunctionality%20issues%2fProbably%20the%20worst%20forum%20software%20in%20the%20world&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000C1184011A4DEFF4BA0E41441DCAEC568&TopicsView=https%3A%2F%2Fmy%2Est%2Ecom%2Fpublic%2FSTe2ecommunities%2Fe2esupport%2FLists%2FFunctionality%2520issues%2FAllItems%2Easpx¤tviews=0 (yes, the stupidly-long links are on the list)