Skip to content

Commit fee1e69

Browse files
stm32l4: Fix formatting in peripheral header files
Co-Authored-By: bsatrom@blues.com <bsatrom@blues.com>
1 parent bcb39bd commit fee1e69

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

ports/stm/peripherals/periph.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ typedef struct {
2121
} mcu_periph_obj_t;
2222

2323
#define PERIPH(index, alt, p_pin) \
24-
{ \
25-
.periph_index = index, \
26-
.altfn_index = alt, \
27-
.pin = p_pin, \
28-
}
24+
{ \
25+
.periph_index = index, \
26+
.altfn_index = alt, \
27+
.pin = p_pin, \
28+
}
2929

3030
// Timer Peripheral
3131

@@ -37,12 +37,12 @@ typedef struct {
3737
} mcu_tim_pin_obj_t;
3838

3939
#define TIM(index, alt, channel, tim_pin) \
40-
{ \
41-
.tim_index = index - 1, \
42-
.altfn_index = alt, \
43-
.channel_index = channel - 1, \
44-
.pin = tim_pin, \
45-
}
40+
{ \
41+
.tim_index = index - 1, \
42+
.altfn_index = alt, \
43+
.channel_index = channel - 1, \
44+
.pin = tim_pin, \
45+
}
4646

4747
// F4 Series
4848
// Access Lines

ports/stm/peripherals/pins.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ typedef struct {
3232
// but all 3 ADCs will share the same input number per pin.
3333
// F4 family has 3 ADC max, 24 channels max.
3434
#define ADC_INPUT(mask, number) \
35-
.adc_unit = mask, \
36-
.adc_channel = number,
35+
.adc_unit = mask, \
36+
.adc_channel = number,
3737

3838
#define NO_ADC \
39-
.adc_unit = 0x00, \
40-
.adc_channel = 0x1f
39+
.adc_unit = 0x00, \
40+
.adc_channel = 0x1f
4141

4242
extern const mp_obj_type_t mcu_pin_type;
4343

4444
// STM32 can have up to 9 ports, each restricted to 16 pins
4545
// We split the pin/port evenly, in contrast to nrf.
4646
#define PIN(p_port, p_number, p_adc) \
47-
{ \
48-
{ &mcu_pin_type }, \
49-
.port = p_port, \
50-
.number = p_number, \
51-
p_adc \
52-
}
47+
{ \
48+
{ &mcu_pin_type }, \
49+
.port = p_port, \
50+
.number = p_number, \
51+
p_adc \
52+
}
5353

5454
// Use illegal pin value to mark unassigned pins.
5555
#define NO_PIN 0xff

0 commit comments

Comments
 (0)