diff options
| author | stijn | 2020-04-16 09:13:57 +0200 |
|---|---|---|
| committer | Damien George | 2020-04-23 11:24:25 +1000 |
| commit | 84fa3312cfa7d2237d4b56952f2cd6e3591210c4 (patch) | |
| tree | dc2b3e67bad9969fc5792ca0822798d58addf174 /ports | |
| parent | d6243568a05d423b58522435c3779975acbf56dd (diff) | |
all: Format code to add space after C++-style comment start.
Note: the uncrustify configuration is explicitly set to 'add' instead of
'force' in order not to alter the comments which use extra spaces after //
as a means of indenting text for clarity.
Diffstat (limited to 'ports')
56 files changed, 131 insertions, 131 deletions
diff --git a/ports/cc3200/mptask.c b/ports/cc3200/mptask.c index b0c32c819..79c7fc349 100644 --- a/ports/cc3200/mptask.c +++ b/ports/cc3200/mptask.c @@ -283,7 +283,7 @@ STATIC void mptask_pre_init (void) { // this one allocates memory for the socket semaphore modusocket_pre_init(); - //CRYPTOHASH_Init(); + // CRYPTOHASH_Init(); #ifndef DEBUG OsiTaskHandle svTaskHandle; diff --git a/ports/esp32/machine_hw_spi.c b/ports/esp32/machine_hw_spi.c index f63b24598..3962e26b7 100644 --- a/ports/esp32/machine_hw_spi.c +++ b/ports/esp32/machine_hw_spi.c @@ -188,7 +188,7 @@ STATIC void machine_hw_spi_init_internal( .pre_cb = NULL }; - //Initialize the SPI bus + // Initialize the SPI bus // Select DMA channel based on the hardware SPI host int dma_chan = 0; diff --git a/ports/esp32/modesp32.c b/ports/esp32/modesp32.c index 9554dbd69..8e248370f 100644 --- a/ports/esp32/modesp32.c +++ b/ports/esp32/modesp32.c @@ -51,7 +51,7 @@ STATIC mp_obj_t esp32_wake_on_touch(const mp_obj_t wake) { if (machine_rtc_config.ext0_pin != -1) { mp_raise_ValueError(MP_ERROR_TEXT("no resources")); } - //mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("touchpad wakeup not available for this version of ESP-IDF")); + // mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("touchpad wakeup not available for this version of ESP-IDF")); machine_rtc_config.wake_on_touch = mp_obj_is_true(wake); return mp_const_none; diff --git a/ports/esp32/modmachine.h b/ports/esp32/modmachine.h index ca1776d8b..fbb43250f 100644 --- a/ports/esp32/modmachine.h +++ b/ports/esp32/modmachine.h @@ -4,7 +4,7 @@ #include "py/obj.h" typedef enum { - //MACHINE_WAKE_IDLE=0x01, + // MACHINE_WAKE_IDLE=0x01, MACHINE_WAKE_SLEEP=0x02, MACHINE_WAKE_DEEPSLEEP=0x04 } wake_type_t; diff --git a/ports/esp32/modnetwork.c b/ports/esp32/modnetwork.c index 85d2f1506..975029121 100644 --- a/ports/esp32/modnetwork.c +++ b/ports/esp32/modnetwork.c @@ -782,7 +782,7 @@ STATIC const mp_rom_map_elem_t mp_module_network_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ETH_CLOCK_GPIO0_IN), MP_ROM_INT(ETH_CLOCK_GPIO0_IN) }, // Disabled at Aug 22nd 2018, reenabled Jan 28th 2019 in ESP-IDF // Because we use older SDK, it's currently disabled - //{ MP_ROM_QSTR(MP_QSTR_ETH_CLOCK_GPIO0_OUT), MP_ROM_INT(ETH_CLOCK_GPIO0_OUT) }, + // { MP_ROM_QSTR(MP_QSTR_ETH_CLOCK_GPIO0_OUT), MP_ROM_INT(ETH_CLOCK_GPIO0_OUT) }, { MP_ROM_QSTR(MP_QSTR_ETH_CLOCK_GPIO16_OUT), MP_ROM_INT(ETH_CLOCK_GPIO16_OUT) }, { MP_ROM_QSTR(MP_QSTR_ETH_CLOCK_GPIO17_OUT), MP_ROM_INT(ETH_CLOCK_GPIO17_OUT) }, #endif diff --git a/ports/esp32/network_lan.c b/ports/esp32/network_lan.c index 5aaabfa21..1f9a733a7 100644 --- a/ports/esp32/network_lan.c +++ b/ports/esp32/network_lan.c @@ -130,7 +130,7 @@ STATIC mp_obj_t get_lan(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ar if (args[ARG_clock_mode].u_int != -1 && args[ARG_clock_mode].u_int != ETH_CLOCK_GPIO0_IN && // Disabled due ESP-IDF (see modnetwork.c note) - //args[ARG_clock_mode].u_int != ETH_CLOCK_GPIO0_OUT && + // args[ARG_clock_mode].u_int != ETH_CLOCK_GPIO0_OUT && args[ARG_clock_mode].u_int != ETH_CLOCK_GPIO16_OUT && args[ARG_clock_mode].u_int != ETH_CLOCK_GPIO17_OUT) { mp_raise_ValueError(MP_ERROR_TEXT("invalid clock mode")); diff --git a/ports/esp32/nimble.c b/ports/esp32/nimble.c index 7b6241204..e60e08bad 100644 --- a/ports/esp32/nimble.c +++ b/ports/esp32/nimble.c @@ -35,7 +35,7 @@ #include "nimble/nimble_port_freertos.h" STATIC void ble_host_task(void *param) { - nimble_port_run(); //This function will return only when nimble_port_stop() is executed. + nimble_port_run(); // This function will return only when nimble_port_stop() is executed. nimble_port_freertos_deinit(); } diff --git a/ports/esp8266/esp_mphal.c b/ports/esp8266/esp_mphal.c index 03676b911..8859046d7 100644 --- a/ports/esp8266/esp_mphal.c +++ b/ports/esp8266/esp_mphal.c @@ -44,7 +44,7 @@ const mp_print_t mp_debug_print = {NULL, mp_hal_debug_tx_strn_cooked}; int uart_attached_to_dupterm; void mp_hal_init(void) { - //ets_wdt_disable(); // it's a pain while developing + // ets_wdt_disable(); // it's a pain while developing mp_hal_rtc_init(); uart_init(UART_BIT_RATE_115200, UART_BIT_RATE_115200); uart_attached_to_dupterm = 0; diff --git a/ports/esp8266/esppwm.c b/ports/esp8266/esppwm.c index bc17fd4da..6116a4689 100644 --- a/ports/esp8266/esppwm.c +++ b/ports/esp8266/esppwm.c @@ -20,7 +20,7 @@ #include "py/mpprint.h" #define PWM_DBG(...) -//#define PWM_DBG(...) mp_printf(&mp_plat_print, __VA_ARGS__) +// #define PWM_DBG(...) mp_printf(&mp_plat_print, __VA_ARGS__) #define ICACHE_RAM_ATTR // __attribute__((section(".text"))) @@ -58,7 +58,7 @@ STATIC uint8_t pwm_current_channel = 0; STATIC uint16_t pwm_gpio = 0; STATIC uint8_t pwm_channel_num = 0; -//XXX: 0xffffffff/(80000000/16)=35A +// XXX: 0xffffffff/(80000000/16)=35A #define US_TO_RTC_TIMER_TICKS(t) \ ((t) ? \ (((t) > 0x35A) ? \ @@ -66,7 +66,7 @@ STATIC uint8_t pwm_channel_num = 0; (((t) * (APB_CLK_FREQ >> 4)) / 1000000)) : \ 0) -//FRC1 +// FRC1 #define FRC1_ENABLE_TIMER BIT7 typedef enum { @@ -333,7 +333,7 @@ void ICACHE_FLASH_ATTR pwm_init(void) { uint8 i; - RTC_REG_WRITE(FRC1_CTRL_ADDRESS, //FRC2_AUTO_RELOAD| + RTC_REG_WRITE(FRC1_CTRL_ADDRESS, // FRC2_AUTO_RELOAD| DIVDED_BY_16 | FRC1_ENABLE_TIMER | TM_EDGE_INT); @@ -379,7 +379,7 @@ pwm_add(uint8_t pin_id, uint32_t pin_mux, uint32_t pin_func) { pwm.duty[i] = 0; pwm_gpio |= (1 << pin_num[channel]); PIN_FUNC_SELECT(pin_mux, pin_func); - GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel])), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel]))) & (~GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE))); //disable open drain; + GPIO_REG_WRITE(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel])), GPIO_REG_READ(GPIO_PIN_ADDR(GPIO_ID_PIN(pin_num[channel]))) & (~GPIO_PIN_PAD_DRIVER_SET(GPIO_PAD_DRIVER_ENABLE))); // disable open drain; pwm_channel_num++; UNLOCK_PWM(critical); // leave critical return channel; @@ -399,7 +399,7 @@ pwm_delete(uint8 channel) { if (pwm_out_io_num[i] == channel) { // exist LOCK_PWM(critical); // enter critical pwm_out_io_num[i] = -1; - pwm_gpio &= ~(1 << pin_num[channel]); //clear the bit + pwm_gpio &= ~(1 << pin_num[channel]); // clear the bit for (j = i; j < pwm_channel_num - 1; j++) { pwm_out_io_num[j] = pwm_out_io_num[j + 1]; pwm.duty[j] = pwm.duty[j + 1]; diff --git a/ports/esp8266/ets_alt_task.c b/ports/esp8266/ets_alt_task.c index ce27758c1..71d022a32 100644 --- a/ports/esp8266/ets_alt_task.c +++ b/ports/esp8266/ets_alt_task.c @@ -101,8 +101,8 @@ bool ets_post(uint8 prio, os_signal_t sig, os_param_t param) { // queue got full emu_tasks[id].i_put = -1; } - //printf("after ets_post: "); dump_task(prio, &emu_tasks[id]); - //dump_tasks(); + // printf("after ets_post: "); dump_task(prio, &emu_tasks[id]); + // dump_tasks(); ets_intr_unlock(); @@ -142,17 +142,17 @@ bool ets_loop_iter(void) { extern uint32_t pend_flag_noise_check; uint32_t *sw_wdt = &pend_flag_noise_check - 6; - //static unsigned cnt; + // static unsigned cnt; bool progress = false; for (volatile struct task_entry *t = emu_tasks; t < &emu_tasks[MP_ARRAY_SIZE(emu_tasks)]; t++) { if (!ets_loop_dont_feed_sw_wdt) { system_soft_wdt_feed(); } ets_intr_lock(); - //printf("etc_loop_iter: "); dump_task(t - emu_tasks + FIRST_PRIO, t); + // printf("etc_loop_iter: "); dump_task(t - emu_tasks + FIRST_PRIO, t); if (t->i_get != t->i_put) { progress = true; - //printf("#%d Calling task %d(%p) (%x, %x)\n", cnt++, + // printf("#%d Calling task %d(%p) (%x, %x)\n", cnt++, // t - emu_tasks + FIRST_PRIO, t->task, t->queue[t->i_get].sig, t->queue[t->i_get].par); int idx = t->i_get; if (t->i_put == -1) { @@ -161,15 +161,15 @@ bool ets_loop_iter(void) { if (++t->i_get == t->qlen) { t->i_get = 0; } - //ets_intr_unlock(); + // ets_intr_unlock(); uint32_t old_sw_wdt = *sw_wdt; t->task(&t->queue[idx]); if (ets_loop_dont_feed_sw_wdt) { // Restore previous SW WDT counter, in case task fed/cleared it *sw_wdt = old_sw_wdt; } - //ets_intr_lock(); - //printf("Done calling task %d\n", t - emu_tasks + FIRST_PRIO); + // ets_intr_lock(); + // printf("Done calling task %d\n", t - emu_tasks + FIRST_PRIO); } ets_intr_unlock(); } @@ -221,7 +221,7 @@ bool ets_run(void) { ets_intr_unlock(); while (1) { if (!ets_loop_iter()) { - //printf("idle\n"); + // printf("idle\n"); ets_intr_lock(); if (idle_cb) { idle_cb(idle_arg); @@ -234,7 +234,7 @@ bool ets_run(void) { } void ets_set_idle_cb(void (*handler)(void *), void *arg) { - //printf("ets_set_idle_cb(%p, %p)\n", handler, arg); + // printf("ets_set_idle_cb(%p, %p)\n", handler, arg); idle_cb = handler; idle_arg = arg; } diff --git a/ports/esp8266/hspi.h b/ports/esp8266/hspi.h index 2fb150627..f92a13994 100644 --- a/ports/esp8266/hspi.h +++ b/ports/esp8266/hspi.h @@ -41,7 +41,7 @@ #define SPI_BYTE_ORDER_HIGH_TO_LOW 1 #define SPI_BYTE_ORDER_LOW_TO_HIGH 0 -#ifndef CPU_CLK_FREQ //Should already be defined in eagle_soc.h +#ifndef CPU_CLK_FREQ // Should already be defined in eagle_soc.h #define CPU_CLK_FREQ (80 * 1000000) #endif diff --git a/ports/esp8266/machine_pin.c b/ports/esp8266/machine_pin.c index d997800d3..f33f97787 100644 --- a/ports/esp8266/machine_pin.c +++ b/ports/esp8266/machine_pin.c @@ -53,7 +53,7 @@ #define GPIO_PULL_NONE (0) #define GPIO_PULL_UP (1) // Removed in SDK 1.1.0 -//#define GPIO_PULL_DOWN (2) +// #define GPIO_PULL_DOWN (2) typedef struct _pin_irq_obj_t { mp_obj_base_t base; @@ -442,7 +442,7 @@ STATIC const mp_rom_map_elem_t pyb_pin_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_OUT), MP_ROM_INT(GPIO_MODE_OUTPUT) }, { MP_ROM_QSTR(MP_QSTR_OPEN_DRAIN), MP_ROM_INT(GPIO_MODE_OPEN_DRAIN) }, { MP_ROM_QSTR(MP_QSTR_PULL_UP), MP_ROM_INT(GPIO_PULL_UP) }, - //{ MP_ROM_QSTR(MP_QSTR_PULL_DOWN), MP_ROM_INT(GPIO_PULL_DOWN) }, + // { MP_ROM_QSTR(MP_QSTR_PULL_DOWN), MP_ROM_INT(GPIO_PULL_DOWN) }, // IRQ triggers, can be or'd together { MP_ROM_QSTR(MP_QSTR_IRQ_RISING), MP_ROM_INT(GPIO_PIN_INTR_POSEDGE) }, diff --git a/ports/esp8266/machine_pwm.c b/ports/esp8266/machine_pwm.c index edfa828c9..1d6a6cfe5 100644 --- a/ports/esp8266/machine_pwm.c +++ b/ports/esp8266/machine_pwm.c @@ -121,7 +121,7 @@ STATIC mp_obj_t pyb_pwm_deinit(mp_obj_t self_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_pwm_deinit_obj, pyb_pwm_deinit); STATIC mp_obj_t pyb_pwm_freq(size_t n_args, const mp_obj_t *args) { - //pyb_pwm_obj_t *self = MP_OBJ_TO_PTR(args[0]); + // pyb_pwm_obj_t *self = MP_OBJ_TO_PTR(args[0]); if (n_args == 1) { // get return MP_OBJ_NEW_SMALL_INT(pwm_get_freq(0)); diff --git a/ports/esp8266/main.c b/ports/esp8266/main.c index aff59364e..a73fbbcf5 100644 --- a/ports/esp8266/main.c +++ b/ports/esp8266/main.c @@ -158,7 +158,7 @@ void MP_FASTCODE(nlr_jump_fail)(void *val) { } } -//void __assert(const char *file, int line, const char *func, const char *expr) { +// void __assert(const char *file, int line, const char *func, const char *expr) { void __assert(const char *file, int line, const char *expr) { printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line); for (;;) { diff --git a/ports/esp8266/modesp.c b/ports/esp8266/modesp.c index 1047b4278..022447313 100644 --- a/ports/esp8266/modesp.c +++ b/ports/esp8266/modesp.c @@ -284,7 +284,7 @@ void esp_native_code_init(void) { } void *esp_native_code_commit(void *buf, size_t len, void *reloc) { - //printf("COMMIT(buf=%p, len=%u, start=%08x, cur=%08x, end=%08x, erased=%08x)\n", buf, len, esp_native_code_start, esp_native_code_cur, esp_native_code_end, esp_native_code_erased); + // printf("COMMIT(buf=%p, len=%u, start=%08x, cur=%08x, end=%08x, erased=%08x)\n", buf, len, esp_native_code_start, esp_native_code_cur, esp_native_code_end, esp_native_code_erased); len = (len + 3) & ~3; if (esp_native_code_cur + len > esp_native_code_end) { diff --git a/ports/esp8266/modmachine.c b/ports/esp8266/modmachine.c index b9573b1af..bc838b420 100644 --- a/ports/esp8266/modmachine.c +++ b/ports/esp8266/modmachine.c @@ -50,8 +50,8 @@ #if MICROPY_PY_MACHINE -//#define MACHINE_WAKE_IDLE (0x01) -//#define MACHINE_WAKE_SLEEP (0x02) +// #define MACHINE_WAKE_IDLE (0x01) +// #define MACHINE_WAKE_SLEEP (0x02) #define MACHINE_WAKE_DEEPSLEEP (0x04) extern const mp_obj_type_t esp_wdt_type; diff --git a/ports/esp8266/uart.h b/ports/esp8266/uart.h index f187c31c6..de0919bde 100644 --- a/ports/esp8266/uart.h +++ b/ports/esp8266/uart.h @@ -62,7 +62,7 @@ typedef struct { uint8 *pRcvMsgBuff; uint8 *pWritePos; uint8 *pReadPos; - uint8 TrigLvl; //JLU: may need to pad + uint8 TrigLvl; // JLU: may need to pad RcvMsgBuffState BuffState; } RcvMsgBuff; @@ -90,7 +90,7 @@ typedef struct { TrxMsgBuff trx_buff; RcvMsgState rcv_state; int received; - int buff_uart_no; //indicate which uart use tx/rx buffer + int buff_uart_no; // indicate which uart use tx/rx buffer } UartDevice; extern uint8 uart_ringbuf_array[UART0_STATIC_RXBUF_LEN]; diff --git a/ports/esp8266/uart_register.h b/ports/esp8266/uart_register.h index fa0bed5fd..f0d646a52 100644 --- a/ports/esp8266/uart_register.h +++ b/ports/esp8266/uart_register.h @@ -1,4 +1,4 @@ -//Generated at 2012-07-03 18:44:06 +// Generated at 2012-07-03 18:44:06 /* * Copyright (c) 2010 - 2011 Espressif System * @@ -7,7 +7,7 @@ #ifndef UART_REGISTER_H_INCLUDED #define UART_REGISTER_H_INCLUDED #define REG_UART_BASE(i) (0x60000000 + (i) * 0xf00) -//version value:32'h062000 +// version value:32'h062000 #define UART_FIFO(i) (REG_UART_BASE(i) + 0x0) #define UART_RXFIFO_RD_BYTE 0x000000FF diff --git a/ports/javascript/mpconfigport.h b/ports/javascript/mpconfigport.h index a9da57c87..0101e10c8 100644 --- a/ports/javascript/mpconfigport.h +++ b/ports/javascript/mpconfigport.h @@ -36,14 +36,14 @@ #define MICROPY_QSTR_BYTES_IN_HASH (2) #define MICROPY_ALLOC_PATH_MAX (256) #define MICROPY_ALLOC_PARSE_CHUNK_INIT (16) -#define MICROPY_EMIT_X64 (0) //BROKEN -#define MICROPY_EMIT_THUMB (0) //BROKEN +#define MICROPY_EMIT_X64 (0) // BROKEN +#define MICROPY_EMIT_THUMB (0) // BROKEN #define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_COMP_MODULE_CONST (0) #define MICROPY_COMP_CONST (1) #define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (1) #define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0) -#define MICROPY_MEM_STATS (0) //BROKEN +#define MICROPY_MEM_STATS (0) // BROKEN #define MICROPY_DEBUG_PRINTERS (0) #define MICROPY_ENABLE_GC (1) #define MICROPY_GC_ALLOC_THRESHOLD (1) @@ -131,7 +131,7 @@ extern const struct _mp_obj_module_t mp_module_utime; #define MICROPY_PORT_BUILTIN_MODULES \ { MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \ -//#define MICROPY_EVENT_POLL_HOOK {ets_event_poll();} +// #define MICROPY_EVENT_POLL_HOOK {ets_event_poll();} #if MICROPY_PY_THREAD #define MICROPY_EVENT_POLL_HOOK \ do { \ @@ -168,7 +168,7 @@ extern const struct _mp_obj_module_t mp_module_utime; // type definitions for the specific machine -//#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1)) +// #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)((mp_uint_t)(p) | 1)) // This port is intended to be 32-bit, but unfortunately, int32_t for // different targets may be defined in different ways - either as int diff --git a/ports/mimxrt/board_init.c b/ports/mimxrt/board_init.c index 48e86c7c0..a3c27b045 100644 --- a/ports/mimxrt/board_init.c +++ b/ports/mimxrt/board_init.c @@ -66,7 +66,7 @@ void board_init(void) { GPIO_PinInit(MICROPY_HW_LED_PORT, MICROPY_HW_LED_PIN, &led_config); board_led_write(true); - //------------- USB0 -------------// + // ------------- USB0 ------------- // // Clock CLOCK_EnableUsbhs0PhyPllClock(kCLOCK_Usbphy480M, 480000000U); diff --git a/ports/minimal/main.c b/ports/minimal/main.c index 65b29e6b6..6943ee758 100644 --- a/ports/minimal/main.c +++ b/ports/minimal/main.c @@ -51,8 +51,8 @@ int main(int argc, char **argv) { #else pyexec_friendly_repl(); #endif - //do_str("print('hello world!', list(x+1 for x in range(10)), end='eol\\n')", MP_PARSE_SINGLE_INPUT); - //do_str("for i in range(10):\r\n print(i)", MP_PARSE_FILE_INPUT); + // do_str("print('hello world!', list(x+1 for x in range(10)), end='eol\\n')", MP_PARSE_SINGLE_INPUT); + // do_str("for i in range(10):\r\n print(i)", MP_PARSE_FILE_INPUT); #else pyexec_frozen_module("frozentest.py"); #endif diff --git a/ports/nrf/nrfx_config.h b/ports/nrf/nrfx_config.h index 6fe5acaa2..0e9064a9e 100644 --- a/ports/nrf/nrfx_config.h +++ b/ports/nrf/nrfx_config.h @@ -51,7 +51,7 @@ #if defined(NRF52840) // for tinyusb -//#define NRFX_IRQ_IS_ENABLED 1 +// #define NRFX_IRQ_IS_ENABLED 1 #define NRFX_POWER_ENABLED 1 #define NRFX_POWER_CONFIG_IRQ_PRIORITY 2 #define NRFX_SYSTICK_ENABLED 1 diff --git a/ports/pic16bit/mpconfigport.h b/ports/pic16bit/mpconfigport.h index a63ff4107..f121081e6 100644 --- a/ports/pic16bit/mpconfigport.h +++ b/ports/pic16bit/mpconfigport.h @@ -73,7 +73,7 @@ // The xc16 compiler doesn't seem to respect alignment (!!) so we // need to use instead an object representation that allows for // 2-byte aligned pointers (see config setting above). -//#define MICROPY_OBJ_BASE_ALIGNMENT __attribute__((aligned(4))) +// #define MICROPY_OBJ_BASE_ALIGNMENT __attribute__((aligned(4))) #define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)((mp_uint_t)(p))) diff --git a/ports/powerpc/mpconfigport.h b/ports/powerpc/mpconfigport.h index 1800b8c7c..7a9277736 100644 --- a/ports/powerpc/mpconfigport.h +++ b/ports/powerpc/mpconfigport.h @@ -33,7 +33,7 @@ // will still be able to execute pre-compiled scripts, compiled with mpy-cross. #define MICROPY_ENABLE_COMPILER (1) -//#define MICROPY_DEBUG_VERBOSE (1) +// #define MICROPY_DEBUG_VERBOSE (1) #define MICROPY_QSTR_BYTES_IN_HASH (1) #define MICROPY_QSTR_EXTRA_POOL mp_qstr_frozen_const_pool diff --git a/ports/stm32/dma.c b/ports/stm32/dma.c index d86cea618..cbcc8542a 100644 --- a/ports/stm32/dma.c +++ b/ports/stm32/dma.c @@ -287,13 +287,13 @@ const dma_descr_t dma_SPI_5_TX = { DMA2_Stream4, DMA_CHANNEL_2, dma_id_12, &dma const dma_descr_t dma_SPI_4_TX = { DMA2_Stream4, DMA_CHANNEL_5, dma_id_12, &dma_init_struct_spi_i2c }; const dma_descr_t dma_SPI_6_TX = { DMA2_Stream5, DMA_CHANNEL_1, dma_id_13, &dma_init_struct_spi_i2c }; const dma_descr_t dma_SPI_1_TX = { DMA2_Stream5, DMA_CHANNEL_3, dma_id_13, &dma_init_struct_spi_i2c }; -//#if defined(STM32F7) && defined(SDMMC2) && ENABLE_SDIO -//const dma_descr_t dma_SDMMC_2 = { DMA2_Stream5, DMA_CHANNEL_11, dma_id_13, &dma_init_struct_sdio }; -//#endif +// #if defined(STM32F7) && defined(SDMMC2) && ENABLE_SDIO +// const dma_descr_t dma_SDMMC_2 = { DMA2_Stream5, DMA_CHANNEL_11, dma_id_13, &dma_init_struct_sdio }; +// #endif const dma_descr_t dma_SPI_6_RX = { DMA2_Stream6, DMA_CHANNEL_1, dma_id_14, &dma_init_struct_spi_i2c }; -//#if ENABLE_SDIO -//const dma_descr_t dma_SDIO_0 = { DMA2_Stream6, DMA_CHANNEL_4, dma_id_14, &dma_init_struct_sdio }; -//#endif +// #if ENABLE_SDIO +// const dma_descr_t dma_SDIO_0 = { DMA2_Stream6, DMA_CHANNEL_4, dma_id_14, &dma_init_struct_sdio }; +// #endif /* not preferred streams const dma_descr_t dma_SPI_1_TX = { DMA2_Stream3, DMA_CHANNEL_3, dma_id_11, &dma_init_struct_spi_i2c }; const dma_descr_t dma_SPI_1_RX = { DMA2_Stream0, DMA_CHANNEL_3, dma_id_8, &dma_init_struct_spi_i2c }; @@ -378,11 +378,11 @@ static const uint8_t dma_irqn[NSTREAM] = { // number. The duplicate streams are ok as long as they aren't used at the same time. // DMA1 streams -//const dma_descr_t dma_ADC_1_RX = { DMA1_Channel1, DMA_REQUEST_0, dma_id_0, NULL }; // unused -//const dma_descr_t dma_ADC_2_RX = { DMA1_Channel2, DMA_REQUEST_0, dma_id_1, NULL }; // unused +// const dma_descr_t dma_ADC_1_RX = { DMA1_Channel1, DMA_REQUEST_0, dma_id_0, NULL }; // unused +// const dma_descr_t dma_ADC_2_RX = { DMA1_Channel2, DMA_REQUEST_0, dma_id_1, NULL }; // unused const dma_descr_t dma_SPI_1_RX = { DMA1_Channel2, DMA_REQUEST_1, dma_id_1, &dma_init_struct_spi_i2c }; const dma_descr_t dma_I2C_3_TX = { DMA1_Channel2, DMA_REQUEST_3, dma_id_1, &dma_init_struct_spi_i2c }; -//const dma_descr_t dma_ADC_3_RX = { DMA1_Channel3, DMA_REQUEST_0, dma_id_2, NULL }; // unused +// const dma_descr_t dma_ADC_3_RX = { DMA1_Channel3, DMA_REQUEST_0, dma_id_2, NULL }; // unused const dma_descr_t dma_SPI_1_TX = { DMA1_Channel3, DMA_REQUEST_1, dma_id_2, &dma_init_struct_spi_i2c }; const dma_descr_t dma_I2C_3_RX = { DMA1_Channel3, DMA_REQUEST_3, dma_id_2, &dma_init_struct_spi_i2c }; #if MICROPY_HW_ENABLE_DAC diff --git a/ports/stm32/i2cslave.c b/ports/stm32/i2cslave.c index da165294a..cacc00e0c 100644 --- a/ports/stm32/i2cslave.c +++ b/ports/stm32/i2cslave.c @@ -90,7 +90,7 @@ void i2c_slave_ev_irq_handler(i2c_slave_t *i2c) { i2c->ICR = I2C_ICR_STOPCF; i2c->OAR1 &= ~I2C_OAR1_OA1EN; if (i2c->ISR & I2C_ISR_DIR) { - //i2c_slave_process_tx_end(); + // i2c_slave_process_tx_end(); } else { i2c_slave_process_rx_end(); } diff --git a/ports/stm32/led.c b/ports/stm32/led.c index 341ce7141..923171884 100644 --- a/ports/stm32/led.c +++ b/ports/stm32/led.c @@ -194,7 +194,7 @@ void led_state(pyb_led_t led, int state) { } const pin_obj_t *led_pin = pyb_led_obj[led - 1].led_pin; - //printf("led_state(%d,%d)\n", led, state); + // printf("led_state(%d,%d)\n", led, state); if (state == 0) { // turn LED off MICROPY_HW_LED_OFF(led_pin); diff --git a/ports/stm32/modnetwork.c b/ports/stm32/modnetwork.c index 588508286..4279df088 100644 --- a/ports/stm32/modnetwork.c +++ b/ports/stm32/modnetwork.c @@ -110,7 +110,7 @@ mp_obj_t mod_network_find_nic(const uint8_t *ip) { for (mp_uint_t i = 0; i < MP_STATE_PORT(mod_network_nic_list).len; i++) { mp_obj_t nic = MP_STATE_PORT(mod_network_nic_list).items[i]; // TODO check IP suitability here - //mod_network_nic_type_t *nic_type = (mod_network_nic_type_t*)mp_obj_get_type(nic); + // mod_network_nic_type_t *nic_type = (mod_network_nic_type_t*)mp_obj_get_type(nic); return nic; } diff --git a/ports/stm32/modnwcc3k.c b/ports/stm32/modnwcc3k.c index 0ff3b2d28..b52958ba2 100644 --- a/ports/stm32/modnwcc3k.c +++ b/ports/stm32/modnwcc3k.c @@ -223,7 +223,7 @@ STATIC int cc3k_socket_accept(mod_network_socket_obj_t *socket, mod_network_sock // return ip and port // it seems CC3000 returns little endian for accept?? - //UNPACK_SOCKADDR(addr, ip, *port); + // UNPACK_SOCKADDR(addr, ip, *port); *port = (addr.sa_data[1] << 8) | addr.sa_data[0]; ip[3] = addr.sa_data[2]; ip[2] = addr.sa_data[3]; diff --git a/ports/stm32/modnwwiznet5k.c b/ports/stm32/modnwwiznet5k.c index db7bc8b18..204b9fcc3 100644 --- a/ports/stm32/modnwwiznet5k.c +++ b/ports/stm32/modnwwiznet5k.c @@ -191,11 +191,11 @@ STATIC int wiznet5k_socket_accept(mod_network_socket_obj_t *socket, mod_network_ socket->u_param.fileno = -1; int _errno2; if (wiznet5k_socket_socket(socket, &_errno2) != 0) { - //printf("(bad resocket %d)\n", _errno2); + // printf("(bad resocket %d)\n", _errno2); } else if (wiznet5k_socket_bind(socket, NULL, *port, &_errno2) != 0) { - //printf("(bad rebind %d)\n", _errno2); + // printf("(bad rebind %d)\n", _errno2); } else if (wiznet5k_socket_listen(socket, 0, &_errno2) != 0) { - //printf("(bad relisten %d)\n", _errno2); + // printf("(bad relisten %d)\n", _errno2); } return 0; @@ -411,7 +411,7 @@ STATIC mp_obj_t wiznet5k_make_new(const mp_obj_type_t *type, size_t n_args, size /// \method regs() /// Dump WIZNET5K registers. STATIC mp_obj_t wiznet5k_regs(mp_obj_t self_in) { - //wiznet5k_obj_t *self = self_in; + // wiznet5k_obj_t *self = self_in; printf("Wiz CREG:"); for (int i = 0; i < 0x50; ++i) { if (i % 16 == 0) { diff --git a/ports/stm32/nimble.c b/ports/stm32/nimble.c index 1f4aa4b2c..0d349585f 100644 --- a/ports/stm32/nimble.c +++ b/ports/stm32/nimble.c @@ -72,7 +72,7 @@ void mp_bluetooth_nimble_hci_uart_rx(hal_uart_rx_cb_t rx_cb, void *rx_arg) { int chr; while ((chr = mp_bluetooth_hci_uart_readchar()) >= 0) { - //printf("UART RX: %02x\n", data); + // printf("UART RX: %02x\n", data); rx_cb(rx_arg, chr); } diff --git a/ports/stm32/pin.h b/ports/stm32/pin.h index 969298a38..2397a9d48 100644 --- a/ports/stm32/pin.h +++ b/ports/stm32/pin.h @@ -69,7 +69,7 @@ typedef struct { extern const pin_named_pin_t pin_board_pins[]; extern const pin_named_pin_t pin_cpu_pins[]; -//extern pin_map_obj_t pin_map_obj; +// extern pin_map_obj_t pin_map_obj; typedef struct { mp_obj_base_t base; diff --git a/ports/stm32/pyb_can.c b/ports/stm32/pyb_can.c index bb0d6754d..ad2efbef4 100644 --- a/ports/stm32/pyb_can.c +++ b/ports/stm32/pyb_can.c @@ -891,8 +891,8 @@ void pyb_can_handle_callback(pyb_can_obj_t *self, uint fifo_id, mp_obj_t callbac } STATIC const mp_stream_p_t can_stream_p = { - //.read = can_read, // is read sensible for CAN? - //.write = can_write, // is write sensible for CAN? + // .read = can_read, // is read sensible for CAN? + // .write = can_write, // is write sensible for CAN? .ioctl = can_ioctl, .is_text = false, }; diff --git a/ports/stm32/rfcore.c b/ports/stm32/rfcore.c index 9b513839c..602ef974b 100644 --- a/ports/stm32/rfcore.c +++ b/ports/stm32/rfcore.c @@ -125,7 +125,7 @@ void ipcc_init(uint32_t irq_pri) { __HAL_RCC_IPCC_CLK_ENABLE(); // Enable wanted IRQs - IPCC->C1CR = 0;//IPCC_C1CR_RXOIE; + IPCC->C1CR = 0; // IPCC_C1CR_RXOIE; IPCC->C1MR = 0xffffffff; NVIC_SetPriority(IPCC_C1_RX_IRQn, irq_pri); HAL_NVIC_EnableIRQ(IPCC_C1_RX_IRQn); @@ -219,15 +219,15 @@ STATIC void tl_parse_hci_msg(const uint8_t *buf, parse_hci_info_t *parse) { // Response packet // assert(buf[1] == 0x0e); kind = "VEND_RESP"; - //uint16_t cmd = buf[4] | buf[5] << 8; - //uint8_t status = buf[6]; + // uint16_t cmd = buf[4] | buf[5] << 8; + // uint8_t status = buf[6]; break; } case 0x12: { // Event packet // assert(buf[1] == 0xff); kind = "VEND_EVT"; - //uint16_t evt = buf[3] | buf[4] << 8; + // uint16_t evt = buf[3] | buf[4] << 8; break; } default: diff --git a/ports/stm32/rtc.c b/ports/stm32/rtc.c index 6b7008476..de2635200 100644 --- a/ports/stm32/rtc.c +++ b/ports/stm32/rtc.c @@ -227,9 +227,9 @@ STATIC HAL_StatusTypeDef PYB_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct uint32_t tickstart = HAL_GetTick(); #if defined(STM32F7) || defined(STM32L4) || defined(STM32H7) || defined(STM32WB) - //__HAL_RCC_PWR_CLK_ENABLE(); + // __HAL_RCC_PWR_CLK_ENABLE(); // Enable write access to Backup domain - //PWR->CR1 |= PWR_CR1_DBP; + // PWR->CR1 |= PWR_CR1_DBP; // Wait for Backup domain Write protection disable while ((PWR->CR1 & PWR_CR1_DBP) == RESET) { if (HAL_GetTick() - tickstart > RCC_DBP_TIMEOUT_VALUE) { @@ -238,7 +238,7 @@ STATIC HAL_StatusTypeDef PYB_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct } #else // Enable write access to Backup domain - //PWR->CR |= PWR_CR_DBP; + // PWR->CR |= PWR_CR_DBP; // Wait for Backup domain Write protection disable while ((PWR->CR & PWR_CR_DBP) == RESET) { if (HAL_GetTick() - tickstart > RCC_DBP_TIMEOUT_VALUE) { @@ -405,7 +405,7 @@ STATIC HAL_StatusTypeDef PYB_RTC_MspInit_Finalise(RTC_HandleTypeDef *hrtc) { PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI; } if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) { - //Error_Handler(); + // Error_Handler(); return HAL_ERROR; } @@ -681,7 +681,7 @@ mp_obj_t pyb_rtc_wakeup(size_t n_args, const mp_obj_t *args) { NVIC_SetPriority(RTC_WKUP_IRQn, IRQ_PRI_RTC_WKUP); HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn); - //printf("wut=%d wucksel=%d\n", wut, wucksel); + // printf("wut=%d wucksel=%d\n", wut, wucksel); } else { // clear WUTIE to disable interrupts RTC->CR &= ~RTC_CR_WUTIE; diff --git a/ports/stm32/storage.c b/ports/stm32/storage.c index e24dcdb62..0fefcbab9 100644 --- a/ports/stm32/storage.c +++ b/ports/stm32/storage.c @@ -140,7 +140,7 @@ static void build_partition(uint8_t *buf, int boot, int type, uint32_t start_blo } bool storage_read_block(uint8_t *dest, uint32_t block) { - //printf("RD %u\n", block); + // printf("RD %u\n", block); if (block == 0) { // fake the MBR so we can decide on our own partition table @@ -172,7 +172,7 @@ bool storage_read_block(uint8_t *dest, uint32_t block) { } bool storage_write_block(const uint8_t *src, uint32_t block) { - //printf("WR %u\n", block); + // printf("WR %u\n", block); if (block == 0) { // can't write MBR, but pretend we did return true; diff --git a/ports/stm32/system_stm32.c b/ports/stm32/system_stm32.c index 30c8bfd89..00b721386 100644 --- a/ports/stm32/system_stm32.c +++ b/ports/stm32/system_stm32.c @@ -280,14 +280,14 @@ void SystemClock_Config(void) { b1 <<= 10; b2 <<= 10; } - RCC_OscInitStruct.PLL.PLLM = m; //MICROPY_HW_CLK_PLLM; - RCC_OscInitStruct.PLL.PLLN = n; //MICROPY_HW_CLK_PLLN; - RCC_OscInitStruct.PLL.PLLP = p; //MICROPY_HW_CLK_PLLP; - RCC_OscInitStruct.PLL.PLLQ = q; //MICROPY_HW_CLK_PLLQ; - - RCC_ClkInitStruct.AHBCLKDivider = h; //RCC_SYSCLK_DIV1; - RCC_ClkInitStruct.APB1CLKDivider = b1; //RCC_HCLK_DIV4; - RCC_ClkInitStruct.APB2CLKDivider = b2; //RCC_HCLK_DIV2; + RCC_OscInitStruct.PLL.PLLM = m; // MICROPY_HW_CLK_PLLM; + RCC_OscInitStruct.PLL.PLLN = n; // MICROPY_HW_CLK_PLLN; + RCC_OscInitStruct.PLL.PLLP = p; // MICROPY_HW_CLK_PLLP; + RCC_OscInitStruct.PLL.PLLQ = q; // MICROPY_HW_CLK_PLLQ; + + RCC_ClkInitStruct.AHBCLKDivider = h; // RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = b1; // RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = b2; // RCC_HCLK_DIV2; #else // defined(MICROPY_HW_CLK_LAST_FREQ) && MICROPY_HW_CLK_LAST_FREQ RCC_OscInitStruct.PLL.PLLM = MICROPY_HW_CLK_PLLM; RCC_OscInitStruct.PLL.PLLN = MICROPY_HW_CLK_PLLN; @@ -393,7 +393,7 @@ void SystemClock_Config(void) { #if MICROPY_HW_CLK_USE_HSE PeriphClkInitStruct.PLLSAI1.PLLSAI1Source = RCC_PLLSOURCE_HSE; - PeriphClkInitStruct.PLLSAI1.PLLSAI1M = 1; //MICROPY_HW_CLK_PLLSAIM; + PeriphClkInitStruct.PLLSAI1.PLLSAI1M = 1; // MICROPY_HW_CLK_PLLSAIM; PeriphClkInitStruct.PLLSAI1.PLLSAI1N = MICROPY_HW_CLK_PLLSAIN; PeriphClkInitStruct.PLLSAI1.PLLSAI1P = MICROPY_HW_CLK_PLLSAIP; PeriphClkInitStruct.PLLSAI1.PLLSAI1Q = MICROPY_HW_CLK_PLLSAIQ; diff --git a/ports/teensy/hal_ftm.c b/ports/teensy/hal_ftm.c index 47dc3e81b..7ae70b2bb 100644 --- a/ports/teensy/hal_ftm.c +++ b/ports/teensy/hal_ftm.c @@ -183,8 +183,8 @@ void HAL_FTM_IC_ConfigChannel(FTM_HandleTypeDef *hftm, FTM_IC_InitTypeDef *sConf } void HAL_FTM_IC_Start(FTM_HandleTypeDef *hftm, uint32_t channel) { - //FTM_TypeDef *FTMx = hftm->Instance; - //assert_param(IS_FTM_INSTANCE(FTMx)); + // FTM_TypeDef *FTMx = hftm->Instance; + // assert_param(IS_FTM_INSTANCE(FTMx)); // Nothing else to do } diff --git a/ports/teensy/led.c b/ports/teensy/led.c index 9f8c594b7..d79e63cf7 100644 --- a/ports/teensy/led.c +++ b/ports/teensy/led.c @@ -51,7 +51,7 @@ void led_state(pyb_led_t led, int state) { return; } const pin_obj_t *led_pin = pyb_led_obj[led - 1].led_pin; - //printf("led_state(%d,%d)\n", led, state); + // printf("led_state(%d,%d)\n", led, state); if (state == 0) { // turn LED off MICROPY_HW_LED_OFF(led_pin); diff --git a/ports/teensy/main.c b/ports/teensy/main.c index 6500d4663..df3fd1ffc 100644 --- a/ports/teensy/main.c +++ b/ports/teensy/main.c @@ -150,7 +150,7 @@ mp_obj_t pyb_gc(void) { } mp_obj_t pyb_gpio(int n_args, mp_obj_t *args) { - //assert(1 <= n_args && n_args <= 2); + // assert(1 <= n_args && n_args <= 2); uint pin = mp_obj_get_int(args[0]); if (pin > CORE_NUM_DIGITAL) { diff --git a/ports/teensy/modpyb.c b/ports/teensy/modpyb.c index 83b25c4d0..26e3f4c43 100644 --- a/ports/teensy/modpyb.c +++ b/ports/teensy/modpyb.c @@ -307,13 +307,13 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&pyb_timer_type) }, -//#if MICROPY_HW_ENABLE_RNG +// #if MICROPY_HW_ENABLE_RNG // { MP_ROM_QSTR(MP_QSTR_rng), MP_ROM_PTR(&pyb_rng_get_obj) }, -//#endif +// #endif -//#if MICROPY_HW_ENABLE_RTC +// #if MICROPY_HW_ENABLE_RTC // { MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&pyb_rtc_type) }, -//#endif +// #endif { MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&pin_type) }, // { MP_ROM_QSTR(MP_QSTR_ExtInt), MP_ROM_PTR(&extint_type) }, @@ -328,9 +328,9 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_Switch), MP_ROM_PTR(&pyb_switch_type) }, #endif -//#if MICROPY_HW_HAS_SDCARD +// #if MICROPY_HW_HAS_SDCARD // { MP_ROM_QSTR(MP_QSTR_SD), MP_ROM_PTR(&pyb_sdcard_obj) }, -//#endif +// #endif { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pyb_led_type) }, // { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&pyb_i2c_type) }, @@ -340,13 +340,13 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = { // { MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&pyb_adc_type) }, // { MP_ROM_QSTR(MP_QSTR_ADCAll), MP_ROM_PTR(&pyb_adc_all_type) }, -//#if MICROPY_HW_ENABLE_DAC +// #if MICROPY_HW_ENABLE_DAC // { MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&pyb_dac_type) }, -//#endif +// #endif -//#if MICROPY_HW_HAS_MMA7660 +// #if MICROPY_HW_HAS_MMA7660 // { MP_ROM_QSTR(MP_QSTR_Accel), MP_ROM_PTR(&pyb_accel_type) }, -//#endif +// #endif }; STATIC MP_DEFINE_CONST_DICT(pyb_module_globals, pyb_module_globals_table); diff --git a/ports/teensy/servo.c b/ports/teensy/servo.c index 222b685a4..8c81255f2 100644 --- a/ports/teensy/servo.c +++ b/ports/teensy/servo.c @@ -72,7 +72,7 @@ pin_error: } static mp_obj_t servo_obj_detach(mp_obj_t self_in) { - //pyb_servo_obj_t *self = self_in; + // pyb_servo_obj_t *self = self_in; return mp_const_none; } diff --git a/ports/teensy/uart.c b/ports/teensy/uart.c index fa50c6753..471b40ee0 100644 --- a/ports/teensy/uart.c +++ b/ports/teensy/uart.c @@ -359,7 +359,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_uart_init_obj, 1, pyb_uart_init); /// \method deinit() /// Turn off the UART bus. STATIC mp_obj_t pyb_uart_deinit(mp_obj_t self_in) { - //pyb_uart_obj_t *self = self_in; + // pyb_uart_obj_t *self = self_in; // TODO return mp_const_none; } diff --git a/ports/unix/gccollect.c b/ports/unix/gccollect.c index 7a92f5f93..231f016c2 100644 --- a/ports/unix/gccollect.c +++ b/ports/unix/gccollect.c @@ -165,7 +165,7 @@ MP_NOINLINE void gc_collect_regs_and_stack(void) { } void gc_collect(void) { - //gc_dump_info(); + // gc_dump_info(); gc_collect_start(); gc_collect_regs_and_stack(); @@ -177,8 +177,8 @@ void gc_collect(void) { #endif gc_collect_end(); - //printf("-----\n"); - //gc_dump_info(); + // printf("-----\n"); + // gc_dump_info(); } -#endif //MICROPY_ENABLE_GC +#endif // MICROPY_ENABLE_GC diff --git a/ports/unix/main.c b/ports/unix/main.c index 74b557016..34847a6ff 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -699,7 +699,7 @@ MP_NOINLINE int main_(int argc, char **argv) { free(heap); #endif - //printf("total bytes = %d\n", m_get_total_bytes_allocated()); + // printf("total bytes = %d\n", m_get_total_bytes_allocated()); return ret & 0xff; } diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c index cf77bb334..598a28cd5 100644 --- a/ports/unix/modffi.c +++ b/ports/unix/modffi.c @@ -91,7 +91,7 @@ typedef struct _mp_obj_fficallback_t { ffi_type *params[]; } mp_obj_fficallback_t; -//STATIC const mp_obj_type_t opaque_type; +// STATIC const mp_obj_type_t opaque_type; STATIC const mp_obj_type_t ffimod_type; STATIC const mp_obj_type_t ffifunc_type; STATIC const mp_obj_type_t fficallback_type; diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c index a3e3dc21b..74e7221de 100644 --- a/ports/unix/modjni.c +++ b/ports/unix/modjni.c @@ -98,7 +98,7 @@ STATIC bool is_object_type(const char *jtypesig) { STATIC void check_exception(void) { jobject exc = JJ1(ExceptionOccurred); if (exc) { - //JJ1(ExceptionDescribe); + // JJ1(ExceptionDescribe); mp_obj_t py_e = new_jobject(exc); JJ1(ExceptionClear); if (JJ(IsInstanceOf, exc, IndexException_class)) { @@ -142,7 +142,7 @@ STATIC void jclass_attr(mp_obj_t self_in, qstr attr_in, mp_obj_t *dest) { dest[0] = new_jobject(obj); return; } - //JJ1(ExceptionDescribe); + // JJ1(ExceptionDescribe); JJ1(ExceptionClear); mp_obj_jmethod_t *o = m_new_obj(mp_obj_jmethod_t); @@ -220,7 +220,7 @@ STATIC void jobject_attr(mp_obj_t self_in, qstr attr_in, mp_obj_t *dest) { dest[0] = new_jobject(obj); return; } - //JJ1(ExceptionDescribe); + // JJ1(ExceptionDescribe); JJ1(ExceptionClear); mp_obj_jmethod_t *o = m_new_obj(mp_obj_jmethod_t); @@ -246,7 +246,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) mp_uint_t idx = mp_obj_get_int(index); char class_name[64]; get_jclass_name(self->obj, class_name); - //printf("class: %s\n", class_name); + // printf("class: %s\n", class_name); if (class_name[0] == '[') { if (class_name[1] == 'L' || class_name[1] == '[') { @@ -412,7 +412,7 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) { if (!MATCH(expected_type, "java.lang.Object")) { char class_name[64]; get_jclass_name(jo->obj, class_name); - //printf("Arg class: %s\n", class_name); + // printf("Arg class: %s\n", class_name); if (strcmp(class_name, expected_type) != 0) { return false; } @@ -425,7 +425,7 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) { return false; } } else if (arg == mp_const_none) { - //printf("TODO: Check java arg type!!\n"); + // printf("TODO: Check java arg type!!\n"); while (isalpha(*arg_type) || *arg_type == '.') { arg_type++; } @@ -470,7 +470,7 @@ STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool jobject name_o = JJ(CallObjectMethod, meth, Object_toString_mid); const char *decl = JJ(GetStringUTFChars, name_o, NULL); const char *arg_types = strchr(decl, '(') + 1; - //const char *arg_types_end = strchr(arg_types, ')'); + // const char *arg_types_end = strchr(arg_types, ')'); // printf("method[%d]=%p %s\n", i, meth, decl); const char *meth_name = NULL; diff --git a/ports/unix/modtime.c b/ports/unix/modtime.c index f9052ecce..84c83da26 100644 --- a/ports/unix/modtime.c +++ b/ports/unix/modtime.c @@ -110,7 +110,7 @@ STATIC mp_obj_t mod_time_sleep(mp_obj_t arg) { break; } mp_handle_pending(true); - //printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec); + // printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec); #else break; #endif diff --git a/ports/unix/modusocket.c b/ports/unix/modusocket.c index 248d721ed..1c9ef3362 100644 --- a/ports/unix/modusocket.c +++ b/ports/unix/modusocket.c @@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_listen_obj, socket_listen); STATIC mp_obj_t socket_accept(mp_obj_t self_in) { mp_obj_socket_t *self = MP_OBJ_TO_PTR(self_in); // sockaddr_storage isn't stack-friendly (129 bytes or so) - //struct sockaddr_storage addr; + // struct sockaddr_storage addr; byte addr[32]; socklen_t addr_len = sizeof(addr); int fd; @@ -547,7 +547,7 @@ STATIC mp_obj_t mod_socket_getaddrinfo(size_t n_args, const mp_obj_t *args) { #ifdef __UCLIBC_MAJOR__ #if __UCLIBC_MAJOR__ == 0 && (__UCLIBC_MINOR__ < 9 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) // "warning" requires -Wno-cpp which is a relatively new gcc option, so we choose not to use it. -//#warning Working around uClibc bug with numeric service name +// #warning Working around uClibc bug with numeric service name // Older versions og uClibc have bugs when numeric ports in service // arg require also hints.ai_socktype (or hints.ai_protocol) != 0 // This actually was fixed in 0.9.32.1, but uClibc doesn't allow to diff --git a/ports/unix/mpthreadport.c b/ports/unix/mpthreadport.c index 5012778be..66c428940 100644 --- a/ports/unix/mpthreadport.c +++ b/ports/unix/mpthreadport.c @@ -93,7 +93,7 @@ STATIC void mp_thread_gc(int signo, siginfo_t *info, void *context) { // We have access to the context (regs, stack) of the thread but it seems // that we don't need the extra information, enough is captured by the // gc_collect_regs_and_stack function above - //gc_collect_root((void**)context, sizeof(ucontext_t) / sizeof(uintptr_t)); + // gc_collect_root((void**)context, sizeof(ucontext_t) / sizeof(uintptr_t)); #if MICROPY_ENABLE_PYSTACK void **ptrs = (void **)(void *)MP_STATE_THREAD(pystack_start); gc_collect_root(ptrs, (MP_STATE_THREAD(pystack_cur) - MP_STATE_THREAD(pystack_start)) / sizeof(void *)); diff --git a/ports/windows/mpconfigport.h b/ports/windows/mpconfigport.h index 057061a5b..84c196e11 100644 --- a/ports/windows/mpconfigport.h +++ b/ports/windows/mpconfigport.h @@ -31,7 +31,7 @@ #define MICROPY_USE_READLINE (1) #endif -#define MICROPY_ALLOC_PATH_MAX (260) //see minwindef.h for msvc or limits.h for mingw +#define MICROPY_ALLOC_PATH_MAX (260) // see minwindef.h for msvc or limits.h for mingw #define MICROPY_PERSISTENT_CODE_LOAD (1) #define MICROPY_EMIT_X64 (0) #define MICROPY_EMIT_THUMB (0) @@ -220,7 +220,7 @@ extern const struct _mp_obj_module_t mp_module_time; #define MP_NOINLINE __declspec(noinline) #define MP_LIKELY(x) (x) #define MP_UNLIKELY(x) (x) -#define MICROPY_PORT_CONSTANTS { "dummy", 0 } //can't have zero-sized array +#define MICROPY_PORT_CONSTANTS { "dummy", 0 } // can't have zero-sized array #ifdef _WIN64 #define MP_SSIZE_MAX _I64_MAX #else @@ -259,7 +259,7 @@ typedef mp_off_t off_t; // System headers (needed e.g. for nlr.h) -#include <stddef.h> //for NULL -#include <assert.h> //for assert +#include <stddef.h> // for NULL +#include <assert.h> // for assert #endif diff --git a/ports/windows/windows_mphal.c b/ports/windows/windows_mphal.c index e805e2ca8..8ed087358 100644 --- a/ports/windows/windows_mphal.c +++ b/ports/windows/windows_mphal.c @@ -150,7 +150,7 @@ STATIC item_t keyCodeMap[] = { {VK_HOME, "[H"}, {VK_END, "[F"}, {VK_DELETE, "[3~"}, - {0, ""} //sentinel + {0, ""} // sentinel }; // likewise, but with Ctrl key down @@ -159,7 +159,7 @@ STATIC item_t ctrlKeyCodeMap[] = { {VK_RIGHT, "f"}, {VK_DELETE, "d"}, {VK_BACK, "\x7F"}, - {0, ""} //sentinel + {0, ""} // sentinel }; STATIC const char *cur_esc_seq = NULL; diff --git a/ports/zephyr/main.c b/ports/zephyr/main.c index c8f9601c3..e304dfd25 100644 --- a/ports/zephyr/main.c +++ b/ports/zephyr/main.c @@ -174,7 +174,7 @@ void gc_collect(void) { gc_collect_start(); gc_collect_root(&dummy, ((mp_uint_t)MP_STATE_THREAD(stack_top) - (mp_uint_t)&dummy) / sizeof(mp_uint_t)); gc_collect_end(); - //gc_dump_info(); + // gc_dump_info(); } #if !MICROPY_READER_VFS diff --git a/ports/zephyr/modusocket.c b/ports/zephyr/modusocket.c index 09d875400..6c900753c 100644 --- a/ports/zephyr/modusocket.c +++ b/ports/zephyr/modusocket.c @@ -94,7 +94,7 @@ STATIC mp_obj_t format_inet_addr(struct sockaddr *addr, mp_obj_t port) { tuple->items[0] = mp_obj_new_str(buf, strlen(buf)); // We employ the fact that port offset is the same for IPv4 & IPv6 // not filled in - //tuple->items[1] = mp_obj_new_int(ntohs(((struct sockaddr_in*)addr)->sin_port)); + // tuple->items[1] = mp_obj_new_int(ntohs(((struct sockaddr_in*)addr)->sin_port)); tuple->items[1] = port; if (addr->sa_family == AF_INET6) { diff --git a/ports/zephyr/modzephyr.c b/ports/zephyr/modzephyr.c index 2d03ac283..d4ee610b2 100644 --- a/ports/zephyr/modzephyr.c +++ b/ports/zephyr/modzephyr.c @@ -70,7 +70,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mod_stacks_analyze_obj, mod_stacks_analyze); #ifdef CONFIG_NET_SHELL -//int net_shell_cmd_iface(int argc, char *argv[]); +// int net_shell_cmd_iface(int argc, char *argv[]); STATIC mp_obj_t mod_shell_net_iface(void) { net_shell_cmd_iface(0, NULL); diff --git a/ports/zephyr/modzsensor.c b/ports/zephyr/modzsensor.c index 1dbf34568..b01ce2693 100644 --- a/ports/zephyr/modzsensor.c +++ b/ports/zephyr/modzsensor.c @@ -143,4 +143,4 @@ const mp_obj_module_t mp_module_zsensor = { .globals = (mp_obj_dict_t *)&mp_module_zsensor_globals, }; -#endif //MICROPY_PY_UHASHLIB +#endif // MICROPY_PY_UHASHLIB |
