First coarse run to fix coding style in locm3.
Added --terse and --mailback options to the make stylecheck target. It also does continue even if it enounters a possible error. We decided on two exceptions from the linux kernel coding standard: - Empty wait while loops may end with ; on the same line. - All blocks after while, if, for have to be in brackets even if they only contain one statement. Otherwise it is easy to introduce an error. Checkpatch needs to be adapted to reflect those changes.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
* particularly unimplemented features are FIXME'd extra
|
||||
* */
|
||||
|
||||
/* the original core_cm3.h is nonfree by arm; this provides libopencm3 variant of the symbols efm32lib needs of CMSIS. */
|
||||
/* the original core_cm3.h is nonfree by arm; this provides libopencm3 variant
|
||||
* of the symbols efm32lib needs of CMSIS. */
|
||||
|
||||
#ifndef OPENCMSIS_CORECM3_H
|
||||
#define OPENCMSIS_CORECM3_H
|
||||
@@ -35,8 +36,7 @@
|
||||
/* structure as in, for example,
|
||||
* DeviceSupport/EnergyMicro/EFM32/efm32tg840f32.h, data from
|
||||
* libopencm3/cm3/scb.h. FIXME incomplete. */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
__IO uint32_t CPUID;
|
||||
__IO uint32_t ICSR;
|
||||
__IO uint32_t VTOR;
|
||||
@@ -55,12 +55,13 @@ typedef struct
|
||||
/* needed by efm32_cmu.h, probably it's just what gcc provides anyway */
|
||||
#define __CLZ(div) __builtin_clz(div)
|
||||
|
||||
/* needed by efm32_aes.c. __builtin_bswap32 does the same thing as the rev instruction according to https://bugzilla.mozilla.org/show_bug.cgi?id=600106 */
|
||||
/* needed by efm32_aes.c. __builtin_bswap32 does the same thing as the rev
|
||||
* instruction according to https://bugzilla.mozilla.org/show_bug.cgi?id=600106
|
||||
*/
|
||||
#define __REV(x) __builtin_bswap32(x)
|
||||
|
||||
/* stubs for efm32_dbg.h */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t DHCSR;
|
||||
uint32_t DEMCR; /* needed by efm32tg stk trace.c */
|
||||
} CoreDebug_TypeDef;
|
||||
@@ -94,8 +95,7 @@ static inline void NVIC_DisableIRQ(uint8_t irqn)
|
||||
|
||||
#define SCB_SHCSR_MEMFAULTENA_Msk 0
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t CTRL;
|
||||
uint32_t RNR;
|
||||
uint32_t RBAR;
|
||||
@@ -133,8 +133,7 @@ typedef struct
|
||||
* */
|
||||
|
||||
/* from d0002_efm32_cortex-m3_reference_manual.pdf section 4.4 */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t CTRL;
|
||||
uint32_t LOAD;
|
||||
uint32_t VAL;
|
||||
@@ -146,7 +145,9 @@ static inline uint32_t SysTick_Config(uint32_t n_ticks)
|
||||
{
|
||||
/* constant from systick_set_reload -- as this returns something that's
|
||||
* not void, this is the only possible error condition */
|
||||
if (n_ticks & ~0x00FFFFFF) return 1;
|
||||
if (n_ticks & ~0x00FFFFFF) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
systick_set_reload(n_ticks);
|
||||
systick_set_clocksource(true);
|
||||
@@ -157,8 +158,7 @@ static inline uint32_t SysTick_Config(uint32_t n_ticks)
|
||||
}
|
||||
|
||||
/* stubs for efm32tg stk trace.c */
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
uint32_t LAR;
|
||||
uint32_t TCR;
|
||||
} ITM_TypeDef;
|
||||
|
||||
Reference in New Issue
Block a user