Skip to content

Commit 07549b7

Browse files
committed
Bring back trimmed spaces.
1 parent 8a93a81 commit 07549b7

File tree

5 files changed

+182
-183
lines changed

5 files changed

+182
-183
lines changed

ports/stm/peripherals/stm32f4/periph.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
#include "stm32f4xx_hal.h"
3434
#include "stm32f4/pins.h"
3535

36-
// I2C
36+
// I2C
3737
// TODO: these objects should be condensed into a single 'periph_pin' unless we
38-
// find a compelling reason to store more unique data in them.
38+
// find a compelling reason to store more unique data in them.
3939

4040
typedef struct {
4141
uint8_t i2c_index:4; // Index of the I2C unit (1 to 3)
@@ -44,8 +44,8 @@ typedef struct {
4444
} mcu_i2c_sda_obj_t;
4545

4646
typedef struct {
47-
uint8_t i2c_index:4;
48-
uint8_t altfn_index:4;
47+
uint8_t i2c_index:4;
48+
uint8_t altfn_index:4;
4949
const mcu_pin_obj_t * pin;
5050
} mcu_i2c_scl_obj_t;
5151

@@ -64,9 +64,9 @@ typedef struct {
6464
.pin = scl_pin, \
6565
}
6666

67-
// SPI
67+
// SPI
6868
// TODO: these objects should be condensed into a single 'periph_pin' unless we
69-
// find a compelling reason to store more unique data in them.
69+
// find a compelling reason to store more unique data in them.
7070

7171
typedef struct {
7272
uint8_t spi_index:4; //Up to 6 SPI units
@@ -75,20 +75,20 @@ typedef struct {
7575
} mcu_spi_sck_obj_t;
7676

7777
typedef struct {
78-
uint8_t spi_index:4;
79-
uint8_t altfn_index:4;
78+
uint8_t spi_index:4;
79+
uint8_t altfn_index:4;
8080
const mcu_pin_obj_t * pin;
8181
} mcu_spi_mosi_obj_t;
8282

8383
typedef struct {
84-
uint8_t spi_index:4;
85-
uint8_t altfn_index:4;
84+
uint8_t spi_index:4;
85+
uint8_t altfn_index:4;
8686
const mcu_pin_obj_t * pin;
8787
} mcu_spi_miso_obj_t;
8888

8989
typedef struct {
90-
uint8_t spi_index:4;
91-
uint8_t altfn_index:4;
90+
uint8_t spi_index:4;
91+
uint8_t altfn_index:4;
9292
const mcu_pin_obj_t * pin;
9393
} mcu_spi_nss_obj_t;
9494

@@ -101,17 +101,17 @@ typedef struct {
101101

102102
// UART
103103
// TODO: these objects should be condensed into a single 'periph_pin' unless we
104-
// find a compelling reason to store more unique data in them.
104+
// find a compelling reason to store more unique data in them.
105105

106106
typedef struct {
107-
uint8_t uart_index:4;
108-
uint8_t altfn_index:4;
107+
uint8_t uart_index:4;
108+
uint8_t altfn_index:4;
109109
const mcu_pin_obj_t * pin;
110110
} mcu_uart_tx_obj_t;
111111

112112
typedef struct {
113-
uint8_t uart_index:4;
114-
uint8_t altfn_index:4;
113+
uint8_t uart_index:4;
114+
uint8_t altfn_index:4;
115115
const mcu_pin_obj_t * pin;
116116
} mcu_uart_rx_obj_t;
117117

@@ -124,8 +124,8 @@ typedef struct {
124124

125125
//Timers
126126
typedef struct {
127-
uint8_t tim_index:4;
128-
uint8_t altfn_index:4;
127+
uint8_t tim_index:4;
128+
uint8_t altfn_index:4;
129129
uint8_t channel_index:4;
130130
const mcu_pin_obj_t * pin;
131131
} mcu_tim_pin_obj_t;
@@ -184,4 +184,4 @@ typedef struct {
184184
#include "stm32f407xx/periph.h"
185185
#endif
186186

187-
#endif // __MICROPY_INCLUDED_STM32F4_PERIPHERALS_PERIPH_H__
187+
#endif // __MICROPY_INCLUDED_STM32F4_PERIPHERALS_PERIPH_H__

ports/stm/peripherals/stm32f4/pins.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ typedef struct {
4040
mp_obj_base_t base;
4141
uint8_t port:4;
4242
uint8_t number:4;
43-
uint8_t adc_unit:3;
43+
uint8_t adc_unit:3;
4444
uint8_t adc_channel:5;
4545
} mcu_pin_obj_t;
4646

@@ -51,8 +51,8 @@ typedef struct {
5151
#define ADC_3 4
5252

5353
//STM32 ADC pins can have a combination of 1, 2 or all 3 ADCs on a single pin,
54-
//but all 3 ADCs will share the same input number per pin.
55-
//F4 family has 3 ADC max, 24 channels max.
54+
//but all 3 ADCs will share the same input number per pin.
55+
//F4 family has 3 ADC max, 24 channels max.
5656
#define ADC_INPUT(mask, number) \
5757
.adc_unit = mask, \
5858
.adc_channel = number,
@@ -64,7 +64,7 @@ typedef struct {
6464
extern const mp_obj_type_t mcu_pin_type;
6565

6666
// STM32 can have up to 9 ports, each restricted to 16 pins
67-
// We split the pin/port evenly, in contrast to nrf.
67+
// We split the pin/port evenly, in contrast to nrf.
6868
#define PIN(p_port, p_number, p_adc) \
6969
{ \
7070
{ &mcu_pin_type }, \
@@ -96,4 +96,4 @@ extern const mp_obj_type_t mcu_pin_type;
9696
#include "stm32f407xx/pins.h"
9797
#endif
9898

99-
#endif // __MICROPY_INCLUDED_STM32F4_PERIPHERALS_PINS_H__
99+
#endif // __MICROPY_INCLUDED_STM32F4_PERIPHERALS_PINS_H__

ports/stm/peripherals/stm32f4/stm32f412zx/gpio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void stm32f4_peripherals_gpio_init(void) {
220220
//never_reset_pin_number(1,4); //PB4 JTRST
221221

222222
// Port H is not included in GPIO port array
223-
// never_reset_pin_number(5,0); //PH0 JTDO
223+
// never_reset_pin_number(5,0); //PH0 JTDO
224224
// never_reset_pin_number(5,1); //PH1 JTRST
225225
}
226226

@@ -240,4 +240,3 @@ void stm32f4_peripherals_status_led(uint8_t led, uint8_t state) {
240240
}
241241
}
242242

243-

ports/stm/supervisor/usb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ STATIC void init_usb_vbus_sense(void) {
5959
}
6060

6161
void init_usb_hardware(void) {
62-
//TODO: if future chips overload this with options, move to peripherals management.
62+
//TODO: if future chips overload this with options, move to peripherals management.
6363

6464
GPIO_InitTypeDef GPIO_InitStruct = {0};
6565
/**USB_OTG_FS GPIO Configuration
6666
PA10 ------> USB_OTG_FS_ID
6767
PA11 ------> USB_OTG_FS_DM
68-
PA12 ------> USB_OTG_FS_DP
68+
PA12 ------> USB_OTG_FS_DP
6969
*/
7070
__HAL_RCC_GPIOA_CLK_ENABLE();
7171

@@ -105,10 +105,10 @@ void init_usb_hardware(void) {
105105
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
106106
never_reset_pin_number(0, 8);
107107
#endif
108-
108+
109109
/* Peripheral clock enable */
110110
__HAL_RCC_USB_OTG_FS_CLK_DISABLE();
111111
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
112112

113113
init_usb_vbus_sense();
114-
}
114+
}

0 commit comments

Comments
 (0)