Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 761e4c7

Browse files
committed
all: Remove trailing spaces, per coding conventions.
1 parent c972c60 commit 761e4c7

29 files changed

+52
-52
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*.dis
1010
*.exe
1111

12-
# Packages
12+
# Packages
1313
############
1414

1515
# Logs and Databases

CODECONVENTIONS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ White space:
7373
keyword and the opening parenthesis.
7474
- Put 1 space after a comma, and 1 space around operators.
7575

76-
Braces:
76+
Braces:
7777
- Use braces for all blocks, even no-line and single-line pieces of
7878
code.
7979
- Put opening braces on the end of the line it belongs to, not on

bare-arm/stm32f405.ld

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MEMORY
1111
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
1212
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
1313
}
14-
14+
1515
/* top end of the stack */
1616
_estack = ORIGIN(RAM) + LENGTH(RAM);
1717

@@ -30,7 +30,7 @@ SECTIONS
3030

3131
. = ALIGN(4);
3232
} >FLASH_ISR
33-
33+
3434
/* The program code and other data goes into FLASH */
3535
.text :
3636
{
@@ -46,7 +46,7 @@ SECTIONS
4646
_etext = .; /* define a global symbol at end of code */
4747
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
4848
} >FLASH_TEXT
49-
49+
5050
/*
5151
.ARM.extab :
5252
{
@@ -60,7 +60,7 @@ SECTIONS
6060
__exidx_end = .;
6161
} >FLASH
6262
*/
63-
63+
6464
/* This is the initialized data section
6565
The program executes knowing that the data is in the RAM
6666
but the loader puts the initial values in the FLASH (inidata).
@@ -76,7 +76,7 @@ SECTIONS
7676
. = ALIGN(4);
7777
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
7878
} >RAM
79-
79+
8080
/* Uninitialized data section */
8181
.bss :
8282
{

esp8266/hspi_register.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Modified by David Ogilvy (MetalPhreak)
44
* Based on original file included in SDK 1.0.0
55
*
6-
* Missing defines from previous SDK versions have
6+
* Missing defines from previous SDK versions have
77
* been added and are noted with comments. The
88
* names of these defines are likely to change.
99
*/

examples/embedding/Makefile.upylib

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ endif
5656

5757
# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
5858
# The unix port of micropython on OSX must be compiled with clang,
59-
# while cross-compile ports require gcc, so we test here for OSX and
59+
# while cross-compile ports require gcc, so we test here for OSX and
6060
# if necessary override the value of 'CC' set in py/mkenv.mk
6161
ifeq ($(UNAME_S),Darwin)
6262
CC = clang

extmod/modubinascii.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ mp_obj_t mod_binascii_a2b_base64(mp_obj_t data) {
118118
vstr_init_len(&vstr, 0);
119119
}
120120
else {
121-
vstr_init_len(&vstr, ((bufinfo.len / 4) * 3) - ((in[bufinfo.len-1] == '=') ? ((in[bufinfo.len-2] == '=') ? 2 : 1 ) : 0));
121+
vstr_init_len(&vstr, ((bufinfo.len / 4) * 3) - ((in[bufinfo.len-1] == '=') ? ((in[bufinfo.len-2] == '=') ? 2 : 1 ) : 0));
122122
}
123123
byte *out = (byte*)vstr.buf;
124124
for (mp_uint_t i = bufinfo.len; i; i -= 4) {

minimal/stm32f405.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ MEMORY
99
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
1010
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
1111
}
12-
12+
1313
/* top end of the stack */
1414
_estack = ORIGIN(RAM) + LENGTH(RAM);
1515

@@ -45,7 +45,7 @@ SECTIONS
4545
. = ALIGN(4);
4646
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
4747
} >RAM
48-
48+
4949
/* Uninitialized data section */
5050
.bss :
5151
{

mpy-cross/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ endif
4545

4646
# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
4747
# The unix port of micropython on OSX must be compiled with clang,
48-
# while cross-compile ports require gcc, so we test here for OSX and
48+
# while cross-compile ports require gcc, so we test here for OSX and
4949
# if necessary override the value of 'CC' set in py/mkenv.mk
5050
ifeq ($(UNAME_S),Darwin)
5151
CC = clang

py/asmarm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ STATIC uint asm_arm_op_orr_reg(uint rd, uint rn, uint rm) {
135135

136136
void asm_arm_bkpt(asm_arm_t *as) {
137137
// bkpt #0
138-
emit_al(as, 0x1200070);
138+
emit_al(as, 0x1200070);
139139
}
140140

141141
// locals:

py/formatfloat.c

+8-8
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
161161
if (fmt == 'g' && prec == 0) {
162162
prec = 1;
163163
}
164-
int e, e1;
164+
int e, e1;
165165
int dec = 0;
166166
char e_sign = '\0';
167167
int num_digits = 0;
@@ -209,7 +209,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
209209
e_sign_char = '+';
210210
}
211211
} else if (fp_isless1(f)) {
212-
e++;
212+
e++;
213213
f *= FPCONST(10.0);
214214
}
215215

@@ -232,7 +232,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
232232

233233
num_digits = prec;
234234
if (num_digits) {
235-
*s++ = '.';
235+
*s++ = '.';
236236
while (--e && num_digits) {
237237
*s++ = '0';
238238
num_digits--;
@@ -266,7 +266,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
266266
f *= FPCONST(0.1);
267267
}
268268

269-
// If the user specified fixed format (fmt == 'f') and e makes the
269+
// If the user specified fixed format (fmt == 'f') and e makes the
270270
// number too big to fit into the available buffer, then we'll
271271
// switch to the 'e' format.
272272

@@ -327,7 +327,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
327327
if (prec == 0) {
328328
prec = 1;
329329
}
330-
num_digits = prec;
330+
num_digits = prec;
331331
}
332332

333333
// Print the digits of the mantissa
@@ -365,7 +365,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
365365
if (rs == buf) {
366366
break;
367367
}
368-
rs--;
368+
rs--;
369369
}
370370
if (*rs == '0') {
371371
// We need to insert a 1
@@ -380,13 +380,13 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
380380
e_sign = '+';
381381
}
382382
} else {
383-
e++;
383+
e++;
384384
}
385385
} else {
386386
// Need at extra digit at the end to make room for the leading '1'
387387
s++;
388388
}
389-
char *ss = s;
389+
char *ss = s;
390390
while (ss > rs) {
391391
*ss = ss[-1];
392392
ss--;

py/mkrules.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ endif
66

77
# This file expects that OBJ contains a list of all of the object files.
88
# The directory portion of each object file is used to locate the source
9-
# and should not contain any ..'s but rather be relative to the top of the
9+
# and should not contain any ..'s but rather be relative to the top of the
1010
# tree.
1111
#
1212
# So for example, py/map.c would have an object file name py/map.o

py/objtype.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ STATIC mp_obj_t instance_unary_op(mp_uint_t op, mp_obj_t self_in) {
375375
if (member[0] == MP_OBJ_NULL) {
376376
// https://docs.python.org/3/reference/datamodel.html#object.__hash__
377377
// "User-defined classes have __eq__() and __hash__() methods by default;
378-
// with them, all objects compare unequal (except with themselves) and
378+
// with them, all objects compare unequal (except with themselves) and
379379
// x.__hash__() returns an appropriate value such that x == y implies
380380
// both that x is y and hash(x) == hash(y)."
381381
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)self_in);

py/runtime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void mp_deinit(void) {
127127
//mp_obj_dict_free(&dict_main);
128128
//mp_map_deinit(&MP_STATE_VM(mp_loaded_modules_map));
129129

130-
// call port specific deinitialization if any
130+
// call port specific deinitialization if any
131131
#ifdef MICROPY_PORT_INIT_FUNC
132132
MICROPY_PORT_DEINIT_FUNC;
133133
#endif

stmhal/boards/common.ld

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ SECTIONS
2727

2828
. = ALIGN(4);
2929
} >FLASH_ISR
30-
30+
3131
/* The program code and other data goes into FLASH */
3232
.text :
3333
{
@@ -40,24 +40,24 @@ SECTIONS
4040
. = ALIGN(4);
4141
_etext = .; /* define a global symbol at end of code */
4242
} >FLASH_TEXT
43-
43+
4444
/* used by the startup to initialize data */
4545
_sidata = LOADADDR(.data);
46-
46+
4747
/* This is the initialized data section
4848
The program executes knowing that the data is in the RAM
4949
but the loader puts the initial values in the FLASH (inidata).
5050
It is one task of the startup to copy the initial values from FLASH to RAM. */
5151
.data :
5252
{
5353
. = ALIGN(4);
54-
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
54+
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
5555
*(.data*) /* .data* sections */
5656

5757
. = ALIGN(4);
5858
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
5959
} >RAM AT> FLASH_TEXT
60-
60+
6161
/* Uninitialized data section */
6262
.bss :
6363
{

stmhal/boards/stm32f401xd.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MEMORY
1515
/* produce a link error if there is not this amount of RAM for these sections */
1616
_minimum_stack_size = 2K;
1717
_minimum_heap_size = 16K;
18-
18+
1919
/* Define tho top end of the stack. The stack is full descending so begins just
2020
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2121
aligned for a call. */

stmhal/boards/stm32f401xe.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MEMORY
1515
/* produce a link error if there is not this amount of RAM for these sections */
1616
_minimum_stack_size = 2K;
1717
_minimum_heap_size = 16K;
18-
18+
1919
/* Define tho top end of the stack. The stack is full descending so begins just
2020
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2121
aligned for a call. */

stmhal/boards/stm32f405.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MEMORY
1616
/* produce a link error if there is not this amount of RAM for these sections */
1717
_minimum_stack_size = 2K;
1818
_minimum_heap_size = 16K;
19-
19+
2020
/* Define tho top end of the stack. The stack is full descending so begins just
2121
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2222
aligned for a call. */

stmhal/boards/stm32f411.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ MEMORY
1111
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x060000 /* sectors 5,6,7 3*128KiB = 384 KiB */
1212
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
1313
}
14-
14+
1515
/* produce a link error if there is not this amount of RAM for these sections */
1616
_minimum_stack_size = 2K;
1717
_minimum_heap_size = 16K;
18-
18+
1919
/* Define tho top end of the stack. The stack is full descending so begins just
2020
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2121
aligned for a call. */

stmhal/boards/stm32f429.ld

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
/* Specify the memory areas */
66
MEMORY
7-
{
7+
{
88
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x0200000 /* entire flash, 2048 KiB */
99
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sector 0, 16 KiB */
1010
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0088000 /* sectors 5,6,7,8, 4*128KiB = 512 KiB (could increase it more) */
1111
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x0030000 /* 192 KiB */
1212
SDRAM(xrw) : ORIGIN = 0xC0000000, LENGTH = 0x0800000 /* 8 MByte */
1313
}
14-
14+
1515
/* produce a link error if there is not this amount of RAM for these sections */
1616
_minimum_stack_size = 2K;
1717
_minimum_heap_size = 16K;
18-
18+
1919
/* Define tho top end of the stack. The stack is full descending so begins just
2020
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2121
aligned for a call. */

stmhal/boards/stm32l476xe.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Specify the memory areas */
66
MEMORY
7-
{
7+
{
88
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
99
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
1010
FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x005C000 /* sectors 8-191, 368 KiB */
@@ -16,7 +16,7 @@ MEMORY
1616
/* produce a link error if there is not this amount of RAM for these sections */
1717
_minimum_stack_size = 2K;
1818
_minimum_heap_size = 16K;
19-
19+
2020
/* Define the top end of the stack. The stack is full descending so begins just
2121
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2222
aligned for a call. */

stmhal/boards/stm32l476xg.ld

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* Specify the memory areas */
66
MEMORY
7-
{
7+
{
88
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
99
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
1010
FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x007C000 /* sectors 8-255, 496 KiB */
@@ -18,7 +18,7 @@ ENTRY(Reset_Handler)
1818
/* produce a link error if there is not this amount of RAM for these sections */
1919
_minimum_stack_size = 2K;
2020
_minimum_heap_size = 16K;
21-
21+
2222
/* Define the top end of the stack. The stack is full descending so begins just
2323
above last byte of RAM. Note that EABI requires the stack to be 8-byte
2424
aligned for a call. */

stmhal/i2c.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void i2c_init(I2C_HandleTypeDef *i2c) {
283283
const pyb_i2c_obj_t *self = &pyb_i2c_obj[i2c_unit - 1];
284284
dma_invalidate_channel(self->tx_dma_descr);
285285
dma_invalidate_channel(self->rx_dma_descr);
286-
286+
287287
if (0) {
288288
#if defined(MICROPY_HW_I2C1_SCL)
289289
} else if (i2c->Instance == I2C1) {

stmhal/sdcard.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ void sdcard_power_off(void) {
216216
if (!sd_handle.Instance) {
217217
return;
218218
}
219-
HAL_SD_DeInit(&sd_handle);
219+
HAL_SD_DeInit(&sd_handle);
220220
sd_handle.Instance = NULL;
221221
}
222222

stmhal/timer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ STATIC mp_obj_t pyb_timer_period(mp_uint_t n_args, const mp_obj_t *args) {
11491149
// Reset the counter to zero. Otherwise, if counter >= period it will
11501150
// continue counting until it wraps (at either 16 or 32 bits depending
11511151
// on the timer).
1152-
__HAL_TIM_SetCounter(&self->tim, 0);
1152+
__HAL_TIM_SetCounter(&self->tim, 0);
11531153
return mp_const_none;
11541154
}
11551155
}

stmhal/uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con
656656
self->read_buf_len = args.read_buf_len.u_int + 1; // +1 to adjust for usable length of buffer
657657
self->read_buf = m_new(byte, self->read_buf_len << self->char_width);
658658
__HAL_UART_ENABLE_IT(&self->uart, UART_IT_RXNE);
659-
HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART);
659+
HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART);
660660
HAL_NVIC_EnableIRQ(self->irqn);
661661
}
662662

0 commit comments

Comments
 (0)