[Style] Global style fix run.

This commit is contained in:
Piotr Esden-Tempski 2014-01-03 01:07:30 +01:00
parent 67efedec54
commit a909b5ca9e
25 changed files with 920 additions and 915 deletions

View File

@ -161,9 +161,12 @@ static inline bool __cm_atomic_set(bool* val)
return cm_mask_interrupts(*val);
}
#define __CM_SAVER(state) __val = state, \
#define __CM_SAVER(state) \
do { \
__val = state, \
__save __attribute__((__cleanup__(__cm_atomic_set))) = \
__cm_atomic_set(&__val)
__cm_atomic_set(&__val); \
} while (0)
#endif /* !defined(__DOXYGEN) */
@ -214,7 +217,9 @@ static inline bool __cm_atomic_set(bool* val)
#define CM_ATOMIC_BLOCK()
#else /* defined(__DOXYGEN__) */
#define CM_ATOMIC_BLOCK() \
for (bool ___CM_SAVER(true), __my = true; __my; __my = false)
do { \
for (bool ___CM_SAVER(true), __my = true; __my; __my = false); \
} while (0)
#endif /* defined(__DOXYGEN__) */
/*---------------------------------------------------------------------------*/

View File

@ -749,5 +749,4 @@ END_DECLS
/**@}*/
#endif

View File

@ -93,7 +93,8 @@ void rcc_peripheral_reset(volatile uint32_t *reg, uint32_t reset)
*
* @param[in] *reg Unsigned int32. Pointer to a Reset Register
* (either RCC_AHBENR, RCC_APB1ENR or RCC_APB2ENR)
* @param[in] clear_reset Unsigned int32. Logical OR of all resets to be removed:
* @param[in] clear_reset Unsigned int32. Logical OR of all resets to be
* removed:
* @li If register is RCC_AHBRSTR, from @ref rcc_ahbrstr_rst
* @li If register is RCC_APB1RSTR, from @ref rcc_apb1rstr_rst
* @li If register is RCC_APB2RSTR, from @ref rcc_apb2rstr_rst

View File

@ -788,7 +788,7 @@ void adc_enable_analog_watchdog_on_all_channels(uint32_t adc)
void adc_enable_analog_watchdog_on_selected_channel(uint32_t adc, uint8_t chan)
{
ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_AWDCH) | \
ADC_CFGR1(adc) = (ADC_CFGR1(adc) & ~ADC_CFGR1_AWDCH) |
ADC_CFGR1_AWDCH_VAL(chan);
ADC_CFGR1(adc) |= ADC_CFGR1_AWDEN | ADC_CFGR1_AWDSGL;