Merge pull request #528 from martinbudden/bf_whitespace

Converted tabs to spaces
This commit is contained in:
Martin Budden 2016-06-16 11:48:54 +01:00 committed by GitHub
commit 5e84431e7a
4 changed files with 40 additions and 40 deletions

View File

@ -81,7 +81,7 @@ void EXTIConfig(IO_t io, extiCallbackRec_t *cb, int irqPriority, EXTITrigger_Typ
#elif defined(STM32F303xC)
SYSCFG_EXTILineConfig(IO_EXTI_PortSourceGPIO(io), IO_EXTI_PinSource(io));
#elif defined(STM32F4)
SYSCFG_EXTILineConfig(IO_EXTI_PortSourceGPIO(io), IO_EXTI_PinSource(io));
SYSCFG_EXTILineConfig(IO_EXTI_PortSourceGPIO(io), IO_EXTI_PinSource(io));
#else
# warning "Unknown CPU"
#endif

View File

@ -22,14 +22,14 @@
// old EXTI interface, to be replaced
typedef struct extiConfig_s {
ioTag_t io;
ioTag_t io;
} extiConfig_t;
typedef struct extiCallbackRec_s extiCallbackRec_t;
typedef void extiHandlerCallback(extiCallbackRec_t *self);
struct extiCallbackRec_s {
extiHandlerCallback *fn;
extiHandlerCallback *fn;
};
void EXTIInit(void);

View File

@ -4,48 +4,48 @@
void RCC_ClockCmd(rccPeriphTag_t periphTag, FunctionalState NewState)
{
int tag = periphTag >> 5;
uint32_t mask = 1 << (periphTag & 0x1f);
switch (tag) {
int tag = periphTag >> 5;
uint32_t mask = 1 << (periphTag & 0x1f);
switch (tag) {
#if defined(STM32F303xC)
case RCC_AHB:
RCC_AHBPeriphClockCmd(mask, NewState);
break;
case RCC_AHB:
RCC_AHBPeriphClockCmd(mask, NewState);
break;
#endif
case RCC_APB2:
RCC_APB2PeriphClockCmd(mask, NewState);
break;
case RCC_APB1:
RCC_APB1PeriphClockCmd(mask, NewState);
break;
case RCC_APB2:
RCC_APB2PeriphClockCmd(mask, NewState);
break;
case RCC_APB1:
RCC_APB1PeriphClockCmd(mask, NewState);
break;
#if defined(STM32F40_41xxx) || defined(STM32F411xE)
case RCC_AHB1:
RCC_AHB1PeriphClockCmd(mask, NewState);
break;
case RCC_AHB1:
RCC_AHB1PeriphClockCmd(mask, NewState);
break;
#endif
}
}
}
void RCC_ResetCmd(rccPeriphTag_t periphTag, FunctionalState NewState)
{
int tag = periphTag >> 5;
uint32_t mask = 1 << (periphTag & 0x1f);
switch (tag) {
int tag = periphTag >> 5;
uint32_t mask = 1 << (periphTag & 0x1f);
switch (tag) {
#if defined(STM32F303xC)
case RCC_AHB:
RCC_AHBPeriphResetCmd(mask, NewState);
break;
case RCC_AHB:
RCC_AHBPeriphResetCmd(mask, NewState);
break;
#endif
case RCC_APB2:
RCC_APB2PeriphResetCmd(mask, NewState);
break;
case RCC_APB1:
RCC_APB1PeriphResetCmd(mask, NewState);
break;
case RCC_APB2:
RCC_APB2PeriphResetCmd(mask, NewState);
break;
case RCC_APB1:
RCC_APB1PeriphResetCmd(mask, NewState);
break;
#if defined(STM32F40_41xxx) || defined(STM32F411xE)
case RCC_AHB1:
RCC_AHB1PeriphResetCmd(mask, NewState);
break;
case RCC_AHB1:
RCC_AHB1PeriphResetCmd(mask, NewState);
break;
#endif
}
}
}

View File

@ -4,11 +4,11 @@
#include "common/utils.h"
enum rcc_reg {
RCC_EMPTY = 0, // make sure that default value (0) does not enable anything
RCC_AHB,
RCC_APB2,
RCC_APB1,
RCC_AHB1,
RCC_EMPTY = 0, // make sure that default value (0) does not enable anything
RCC_AHB,
RCC_APB2,
RCC_APB1,
RCC_AHB1,
};
#define RCC_ENCODE(reg, mask) (((reg) << 5) | LOG2_32BIT(mask))