all: Remove trailing spaces, per coding conventions.
This commit is contained in:
parent
c972c60dbe
commit
761e4c7ff6
|
@ -9,7 +9,7 @@
|
|||
*.dis
|
||||
*.exe
|
||||
|
||||
# Packages
|
||||
# Packages
|
||||
############
|
||||
|
||||
# Logs and Databases
|
||||
|
|
|
@ -73,7 +73,7 @@ White space:
|
|||
keyword and the opening parenthesis.
|
||||
- Put 1 space after a comma, and 1 space around operators.
|
||||
|
||||
Braces:
|
||||
Braces:
|
||||
- Use braces for all blocks, even no-line and single-line pieces of
|
||||
code.
|
||||
- Put opening braces on the end of the line it belongs to, not on
|
||||
|
|
|
@ -11,7 +11,7 @@ MEMORY
|
|||
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
|
||||
}
|
||||
|
||||
|
||||
/* top end of the stack */
|
||||
_estack = ORIGIN(RAM) + LENGTH(RAM);
|
||||
|
||||
|
@ -30,7 +30,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
} >FLASH_ISR
|
||||
|
||||
|
||||
/* The program code and other data goes into FLASH */
|
||||
.text :
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ SECTIONS
|
|||
_etext = .; /* define a global symbol at end of code */
|
||||
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
|
||||
} >FLASH_TEXT
|
||||
|
||||
|
||||
/*
|
||||
.ARM.extab :
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ SECTIONS
|
|||
__exidx_end = .;
|
||||
} >FLASH
|
||||
*/
|
||||
|
||||
|
||||
/* This is the initialized data section
|
||||
The program executes knowing that the data is in the RAM
|
||||
but the loader puts the initial values in the FLASH (inidata).
|
||||
|
@ -76,7 +76,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
||||
} >RAM
|
||||
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Modified by David Ogilvy (MetalPhreak)
|
||||
* Based on original file included in SDK 1.0.0
|
||||
*
|
||||
* Missing defines from previous SDK versions have
|
||||
* Missing defines from previous SDK versions have
|
||||
* been added and are noted with comments. The
|
||||
* names of these defines are likely to change.
|
||||
*/
|
||||
|
|
|
@ -56,7 +56,7 @@ endif
|
|||
|
||||
# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
|
||||
# The unix port of micropython on OSX must be compiled with clang,
|
||||
# while cross-compile ports require gcc, so we test here for OSX and
|
||||
# while cross-compile ports require gcc, so we test here for OSX and
|
||||
# if necessary override the value of 'CC' set in py/mkenv.mk
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
CC = clang
|
||||
|
|
|
@ -118,7 +118,7 @@ mp_obj_t mod_binascii_a2b_base64(mp_obj_t data) {
|
|||
vstr_init_len(&vstr, 0);
|
||||
}
|
||||
else {
|
||||
vstr_init_len(&vstr, ((bufinfo.len / 4) * 3) - ((in[bufinfo.len-1] == '=') ? ((in[bufinfo.len-2] == '=') ? 2 : 1 ) : 0));
|
||||
vstr_init_len(&vstr, ((bufinfo.len / 4) * 3) - ((in[bufinfo.len-1] == '=') ? ((in[bufinfo.len-2] == '=') ? 2 : 1 ) : 0));
|
||||
}
|
||||
byte *out = (byte*)vstr.buf;
|
||||
for (mp_uint_t i = bufinfo.len; i; i -= 4) {
|
||||
|
|
|
@ -9,7 +9,7 @@ MEMORY
|
|||
CCMRAM (xrw) : ORIGIN = 0x10000000, LENGTH = 0x010000 /* 64 KiB */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
|
||||
}
|
||||
|
||||
|
||||
/* top end of the stack */
|
||||
_estack = ORIGIN(RAM) + LENGTH(RAM);
|
||||
|
||||
|
@ -45,7 +45,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
||||
} >RAM
|
||||
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ endif
|
|||
|
||||
# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
|
||||
# The unix port of micropython on OSX must be compiled with clang,
|
||||
# while cross-compile ports require gcc, so we test here for OSX and
|
||||
# while cross-compile ports require gcc, so we test here for OSX and
|
||||
# if necessary override the value of 'CC' set in py/mkenv.mk
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
CC = clang
|
||||
|
|
|
@ -135,7 +135,7 @@ STATIC uint asm_arm_op_orr_reg(uint rd, uint rn, uint rm) {
|
|||
|
||||
void asm_arm_bkpt(asm_arm_t *as) {
|
||||
// bkpt #0
|
||||
emit_al(as, 0x1200070);
|
||||
emit_al(as, 0x1200070);
|
||||
}
|
||||
|
||||
// locals:
|
||||
|
|
|
@ -161,7 +161,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
|
|||
if (fmt == 'g' && prec == 0) {
|
||||
prec = 1;
|
||||
}
|
||||
int e, e1;
|
||||
int e, e1;
|
||||
int dec = 0;
|
||||
char e_sign = '\0';
|
||||
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
|
|||
e_sign_char = '+';
|
||||
}
|
||||
} else if (fp_isless1(f)) {
|
||||
e++;
|
||||
e++;
|
||||
f *= FPCONST(10.0);
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
|
|||
|
||||
num_digits = prec;
|
||||
if (num_digits) {
|
||||
*s++ = '.';
|
||||
*s++ = '.';
|
||||
while (--e && num_digits) {
|
||||
*s++ = '0';
|
||||
num_digits--;
|
||||
|
@ -266,7 +266,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
|
|||
f *= FPCONST(0.1);
|
||||
}
|
||||
|
||||
// If the user specified fixed format (fmt == 'f') and e makes the
|
||||
// If the user specified fixed format (fmt == 'f') and e makes the
|
||||
// number too big to fit into the available buffer, then we'll
|
||||
// switch to the 'e' format.
|
||||
|
||||
|
@ -327,7 +327,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch
|
|||
if (prec == 0) {
|
||||
prec = 1;
|
||||
}
|
||||
num_digits = prec;
|
||||
num_digits = prec;
|
||||
}
|
||||
|
||||
// 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
|
|||
if (rs == buf) {
|
||||
break;
|
||||
}
|
||||
rs--;
|
||||
rs--;
|
||||
}
|
||||
if (*rs == '0') {
|
||||
// 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
|
|||
e_sign = '+';
|
||||
}
|
||||
} else {
|
||||
e++;
|
||||
e++;
|
||||
}
|
||||
} else {
|
||||
// Need at extra digit at the end to make room for the leading '1'
|
||||
s++;
|
||||
}
|
||||
char *ss = s;
|
||||
char *ss = s;
|
||||
while (ss > rs) {
|
||||
*ss = ss[-1];
|
||||
ss--;
|
||||
|
|
|
@ -6,7 +6,7 @@ endif
|
|||
|
||||
# This file expects that OBJ contains a list of all of the object files.
|
||||
# The directory portion of each object file is used to locate the source
|
||||
# and should not contain any ..'s but rather be relative to the top of the
|
||||
# and should not contain any ..'s but rather be relative to the top of the
|
||||
# tree.
|
||||
#
|
||||
# So for example, py/map.c would have an object file name py/map.o
|
||||
|
|
|
@ -375,7 +375,7 @@ STATIC mp_obj_t instance_unary_op(mp_uint_t op, mp_obj_t self_in) {
|
|||
if (member[0] == MP_OBJ_NULL) {
|
||||
// https://docs.python.org/3/reference/datamodel.html#object.__hash__
|
||||
// "User-defined classes have __eq__() and __hash__() methods by default;
|
||||
// with them, all objects compare unequal (except with themselves) and
|
||||
// with them, all objects compare unequal (except with themselves) and
|
||||
// x.__hash__() returns an appropriate value such that x == y implies
|
||||
// both that x is y and hash(x) == hash(y)."
|
||||
return MP_OBJ_NEW_SMALL_INT((mp_uint_t)self_in);
|
||||
|
|
|
@ -127,7 +127,7 @@ void mp_deinit(void) {
|
|||
//mp_obj_dict_free(&dict_main);
|
||||
//mp_map_deinit(&MP_STATE_VM(mp_loaded_modules_map));
|
||||
|
||||
// call port specific deinitialization if any
|
||||
// call port specific deinitialization if any
|
||||
#ifdef MICROPY_PORT_INIT_FUNC
|
||||
MICROPY_PORT_DEINIT_FUNC;
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@ SECTIONS
|
|||
|
||||
. = ALIGN(4);
|
||||
} >FLASH_ISR
|
||||
|
||||
|
||||
/* The program code and other data goes into FLASH */
|
||||
.text :
|
||||
{
|
||||
|
@ -40,10 +40,10 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
_etext = .; /* define a global symbol at end of code */
|
||||
} >FLASH_TEXT
|
||||
|
||||
|
||||
/* used by the startup to initialize data */
|
||||
_sidata = LOADADDR(.data);
|
||||
|
||||
|
||||
/* This is the initialized data section
|
||||
The program executes knowing that the data is in the RAM
|
||||
but the loader puts the initial values in the FLASH (inidata).
|
||||
|
@ -51,13 +51,13 @@ SECTIONS
|
|||
.data :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
|
||||
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */
|
||||
*(.data*) /* .data* sections */
|
||||
|
||||
. = ALIGN(4);
|
||||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */
|
||||
} >RAM AT> FLASH_TEXT
|
||||
|
||||
|
||||
/* Uninitialized data section */
|
||||
.bss :
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ MEMORY
|
|||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define tho top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -15,7 +15,7 @@ MEMORY
|
|||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define tho top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -16,7 +16,7 @@ MEMORY
|
|||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define tho top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -11,11 +11,11 @@ MEMORY
|
|||
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x060000 /* sectors 5,6,7 3*128KiB = 384 KiB */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x020000 /* 128 KiB */
|
||||
}
|
||||
|
||||
|
||||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define tho top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x0200000 /* entire flash, 2048 KiB */
|
||||
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sector 0, 16 KiB */
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0088000 /* sectors 5,6,7,8, 4*128KiB = 512 KiB (could increase it more) */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x0030000 /* 192 KiB */
|
||||
SDRAM(xrw) : ORIGIN = 0xC0000000, LENGTH = 0x0800000 /* 8 MByte */
|
||||
}
|
||||
|
||||
|
||||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define tho top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
|
||||
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x005C000 /* sectors 8-191, 368 KiB */
|
||||
|
@ -16,7 +16,7 @@ MEMORY
|
|||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define the top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
|
||||
FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0004000 /* sectors 0-7, 16 KiB */
|
||||
FLASH_TEXT (rx) : ORIGIN = 0x08004000, LENGTH = 0x007C000 /* sectors 8-255, 496 KiB */
|
||||
|
@ -18,7 +18,7 @@ ENTRY(Reset_Handler)
|
|||
/* produce a link error if there is not this amount of RAM for these sections */
|
||||
_minimum_stack_size = 2K;
|
||||
_minimum_heap_size = 16K;
|
||||
|
||||
|
||||
/* Define the top end of the stack. The stack is full descending so begins just
|
||||
above last byte of RAM. Note that EABI requires the stack to be 8-byte
|
||||
aligned for a call. */
|
||||
|
|
|
@ -283,7 +283,7 @@ void i2c_init(I2C_HandleTypeDef *i2c) {
|
|||
const pyb_i2c_obj_t *self = &pyb_i2c_obj[i2c_unit - 1];
|
||||
dma_invalidate_channel(self->tx_dma_descr);
|
||||
dma_invalidate_channel(self->rx_dma_descr);
|
||||
|
||||
|
||||
if (0) {
|
||||
#if defined(MICROPY_HW_I2C1_SCL)
|
||||
} else if (i2c->Instance == I2C1) {
|
||||
|
|
|
@ -216,7 +216,7 @@ void sdcard_power_off(void) {
|
|||
if (!sd_handle.Instance) {
|
||||
return;
|
||||
}
|
||||
HAL_SD_DeInit(&sd_handle);
|
||||
HAL_SD_DeInit(&sd_handle);
|
||||
sd_handle.Instance = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1149,7 +1149,7 @@ STATIC mp_obj_t pyb_timer_period(mp_uint_t n_args, const mp_obj_t *args) {
|
|||
// Reset the counter to zero. Otherwise, if counter >= period it will
|
||||
// continue counting until it wraps (at either 16 or 32 bits depending
|
||||
// on the timer).
|
||||
__HAL_TIM_SetCounter(&self->tim, 0);
|
||||
__HAL_TIM_SetCounter(&self->tim, 0);
|
||||
return mp_const_none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -656,7 +656,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con
|
|||
self->read_buf_len = args.read_buf_len.u_int + 1; // +1 to adjust for usable length of buffer
|
||||
self->read_buf = m_new(byte, self->read_buf_len << self->char_width);
|
||||
__HAL_UART_ENABLE_IT(&self->uart, UART_IT_RXNE);
|
||||
HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART);
|
||||
HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART);
|
||||
HAL_NVIC_EnableIRQ(self->irqn);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@ condition a test. The run-tests script uses small scripts in the
|
|||
feature_check directory to check whether each such feature is present,
|
||||
and skips the relevant tests if not.
|
||||
|
||||
When creating new tests, anything that relies on float support should go in the
|
||||
When creating new tests, anything that relies on float support should go in the
|
||||
float/ subdirectory. Anything that relies on import x, where x is not a built-in
|
||||
module, should go in the import/ subdirectory.
|
||||
|
|
|
@ -28,9 +28,9 @@ bin_stmhal=stmhal/build-PYBV10/firmware.elf
|
|||
bin_barearm_1=bare-arm/build/flash.elf
|
||||
bin_barearm_2=bare-arm/build/firmware.elf
|
||||
bin_minimal=minimal/build/firmware.elf
|
||||
bin_cc3200_1=cc3200/build/LAUNCHXL/application.axf
|
||||
bin_cc3200_2=cc3200/build/LAUNCHXL/release/application.axf
|
||||
bin_cc3200_3=cc3200/build/WIPY/release/application.axf
|
||||
bin_cc3200_1=cc3200/build/LAUNCHXL/application.axf
|
||||
bin_cc3200_2=cc3200/build/LAUNCHXL/release/application.axf
|
||||
bin_cc3200_3=cc3200/build/WIPY/release/application.axf
|
||||
|
||||
# start at zero size; if build fails reuse previous valid size
|
||||
size_unix="0"
|
||||
|
|
|
@ -43,7 +43,7 @@ int gettimeofday(struct timeval *tp, struct timezone *tz) {
|
|||
|
||||
// to microseconds
|
||||
ft.tm /= 10;
|
||||
|
||||
|
||||
// convert to unix format
|
||||
// number of microseconds intervals between the 1st january 1601 and the 1st january 1970 (369 years + 89 leap days)
|
||||
const unsigned __int64 deltaEpoch = 11644473600000000ull;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
HANDLE waitTimer = NULL;
|
||||
|
||||
void init_sleep(void) {
|
||||
waitTimer = CreateWaitableTimer(NULL, TRUE, NULL);
|
||||
waitTimer = CreateWaitableTimer(NULL, TRUE, NULL);
|
||||
}
|
||||
|
||||
void deinit_sleep(void) {
|
||||
|
|
Loading…
Reference in New Issue