stm32: Reindent ifdefs in stm32f0_i2c.c
A whitespace and comment change only - no functional changes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
9c2ccceb9f
commit
448c1a1488
|
@ -16,62 +16,62 @@ struct i2c_info {
|
|||
};
|
||||
|
||||
#if CONFIG_MACH_STM32F0
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PF1_PF0", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PF1_PF0", "PF1,PF0");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
// Deprecated "i2c1a" style mappings
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1a", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1a", "PF1,PF0");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PF1_PF0", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PF1_PF0", "PF1,PF0");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
// Deprecated "i2c1a" style mappings
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1a", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1a", "PF1,PF0");
|
||||
#elif CONFIG_MACH_STM32G0
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA9_PA10", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA9_PA10", "PA9,PA10");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB10_PB11", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB10_PB11", "PB10,PB11");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB13_PB14", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB13_PB14", "PB13,PB14");
|
||||
#ifdef I2C3
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PB3_PB4", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PB3_PB4", "PB3,PB4");
|
||||
#endif
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA9_PA10", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA9_PA10", "PA9,PA10");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB10_PB11", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB10_PB11", "PB10,PB11");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB13_PB14", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB13_PB14", "PB13,PB14");
|
||||
#ifdef I2C3
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PB3_PB4", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PB3_PB4", "PB3,PB4");
|
||||
#endif
|
||||
#elif CONFIG_MACH_STM32L4
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA9_PA10", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA9_PA10", "PA9,PA10");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB10_PB11", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB10_PB11", "PB10,PB11");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB13_PB14", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB13_PB14", "PB13,PB14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PA7_PB4", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PA7_PB4", "PA7,PB4");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB6_PB7", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB6_PB7", "PB6,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA9_PA10", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA9_PA10", "PA9,PA10");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB10_PB11", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB10_PB11", "PB10,PB11");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PB13_PB14", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PB13_PB14", "PB13,PB14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PA7_PB4", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PA7_PB4", "PA7,PB4");
|
||||
#elif CONFIG_MACH_STM32G4
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA13_PA14", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA13_PA14", "PA13,PA14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA15_PA14", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA15_PA14", "PA15,PA14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB7", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB7", "PB8,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PA9_PA8", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PA9_PA8", "PA9,PA8");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PC4_PF0", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PC4_PF0", "PC4,PF0");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PC8_PC9", 6);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PC8_PC9", "PC8,PC9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PC8_PC11", 7);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PC8_PC11", "PC8,PC11");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA13_PA14", 0);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA13_PA14", "PA13,PA14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PA15_PA14", 1);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PA15_PA14", "PA15,PA14");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB7", 2);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB7", "PB8,PB7");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c1_PB8_PB9", 3);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c1_PB8_PB9", "PB8,PB9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PA9_PA8", 4);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PA9_PA8", "PA9,PA8");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c2_PC4_PF0", 5);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c2_PC4_PF0", "PC4,PF0");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PC8_PC9", 6);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PC8_PC9", "PC8,PC9");
|
||||
DECL_ENUMERATION("i2c_bus", "i2c3_PC8_PC11", 7);
|
||||
DECL_CONSTANT_STR("BUS_PINS_i2c3_PC8_PC11", "PC8,PC11");
|
||||
#endif
|
||||
|
||||
static const struct i2c_info i2c_bus[] = {
|
||||
|
@ -85,9 +85,9 @@ static const struct i2c_info i2c_bus[] = {
|
|||
{ I2C1, GPIO('A', 9), GPIO('A', 10), GPIO_FUNCTION(6) },
|
||||
{ I2C2, GPIO('B', 10), GPIO('B', 11), GPIO_FUNCTION(6) },
|
||||
{ I2C2, GPIO('B', 13), GPIO('B', 14), GPIO_FUNCTION(6) },
|
||||
#ifdef I2C3
|
||||
#ifdef I2C3
|
||||
{ I2C3, GPIO('B', 3), GPIO('B', 4), GPIO_FUNCTION(6) },
|
||||
#endif
|
||||
#endif
|
||||
#elif CONFIG_MACH_STM32L4
|
||||
{ I2C1, GPIO('B', 6), GPIO('B', 7), GPIO_FUNCTION(4) },
|
||||
{ I2C1, GPIO('B', 8), GPIO('B', 9), GPIO_FUNCTION(4) },
|
||||
|
@ -104,7 +104,6 @@ static const struct i2c_info i2c_bus[] = {
|
|||
{ I2C2, GPIO('C', 4), GPIO('F', 0), GPIO_FUNCTION(4) },
|
||||
{ I2C3, GPIO('C', 8), GPIO('C', 9), GPIO_FUNCTION(8) },
|
||||
{ I2C3, GPIO('C', 8), GPIO('C', 11), GPIO_FUNCTION(8) },
|
||||
// { I2C3, GPIO('A', 8), GPIO('B', 5), GPIO_FUNCTION(4) },
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue