Skip to content

Commit

Permalink
all: Format code to add space after C++-style comment start.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stinos authored and dpgeorge committed Apr 23, 2020
1 parent d624356 commit 84fa331
Show file tree
Hide file tree
Showing 90 changed files with 201 additions and 201 deletions.
2 changes: 1 addition & 1 deletion extmod/modubinascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,4 @@ const mp_obj_module_t mp_module_ubinascii = {
.globals = (mp_obj_dict_t *)&mp_module_binascii_globals,
};

#endif //MICROPY_PY_UBINASCII
#endif // MICROPY_PY_UBINASCII
2 changes: 1 addition & 1 deletion extmod/moducryptolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,4 +375,4 @@ const mp_obj_module_t mp_module_ucryptolib = {
.globals = (mp_obj_dict_t *)&mp_module_ucryptolib_globals,
};

#endif //MICROPY_PY_UCRYPTOLIB
#endif // MICROPY_PY_UCRYPTOLIB
6 changes: 3 additions & 3 deletions extmod/moductypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(deref);
mp_uint_t val_type = GET_TYPE(offset, VAL_TYPE_BITS);
offset &= VALUE_MASK(VAL_TYPE_BITS);
//printf("scalar type=%d offset=%x\n", val_type, offset);
// printf("scalar type=%d offset=%x\n", val_type, offset);

if (val_type <= INT64 || val_type == FLOAT32 || val_type == FLOAT64) {
// printf("size=%d\n", GET_SCALAR_SIZE(val_type));
Expand Down Expand Up @@ -501,7 +501,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
mp_int_t offset = MP_OBJ_SMALL_INT_VALUE(sub->items[0]);
mp_uint_t agg_type = GET_TYPE(offset, AGG_TYPE_BITS);
offset &= VALUE_MASK(AGG_TYPE_BITS);
//printf("agg type=%d offset=%x\n", agg_type, offset);
// printf("agg type=%d offset=%x\n", agg_type, offset);

switch (agg_type) {
case STRUCT: {
Expand All @@ -525,7 +525,7 @@ STATIC mp_obj_t uctypes_struct_attr_op(mp_obj_t self_in, qstr attr, mp_obj_t set
o->desc = MP_OBJ_FROM_PTR(sub);
o->addr = self->addr + offset;
o->flags = self->flags;
//printf("PTR/ARR base addr=%p\n", o->addr);
// printf("PTR/ARR base addr=%p\n", o->addr);
return MP_OBJ_FROM_PTR(o);
}
}
Expand Down
2 changes: 1 addition & 1 deletion extmod/moduhashlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,4 @@ const mp_obj_module_t mp_module_uhashlib = {
.globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals,
};

#endif //MICROPY_PY_UHASHLIB
#endif // MICROPY_PY_UHASHLIB
2 changes: 1 addition & 1 deletion extmod/moduheapq.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ const mp_obj_module_t mp_module_uheapq = {
};
#endif

#endif //MICROPY_PY_UHEAPQ
#endif // MICROPY_PY_UHEAPQ
2 changes: 1 addition & 1 deletion extmod/modujson.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,4 @@ const mp_obj_module_t mp_module_ujson = {
.globals = (mp_obj_dict_t *)&mp_module_ujson_globals,
};

#endif //MICROPY_PY_UJSON
#endif // MICROPY_PY_UJSON
2 changes: 1 addition & 1 deletion extmod/modurandom.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ const mp_obj_module_t mp_module_urandom = {
};
#endif

#endif //MICROPY_PY_URANDOM
#endif // MICROPY_PY_URANDOM
2 changes: 1 addition & 1 deletion extmod/modure.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,4 @@ const mp_obj_module_t mp_module_ure = {
#include "re1.5/recursiveloop.c"
#include "re1.5/charclass.c"

#endif //MICROPY_PY_URE
#endif // MICROPY_PY_URE
2 changes: 1 addition & 1 deletion extmod/modutimeq.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ const mp_obj_module_t mp_module_utimeq = {
.globals = (mp_obj_dict_t *)&mp_module_utimeq_globals,
};

#endif //MICROPY_PY_UTIMEQ
#endif // MICROPY_PY_UTIMEQ
2 changes: 1 addition & 1 deletion extmod/moduwebsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
return 0;
}

//DEBUG_printf("Finished receiving ctrl message %x, ignoring\n", self->last_flags);
// DEBUG_printf("Finished receiving ctrl message %x, ignoring\n", self->last_flags);
continue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion extmod/modwebrepl.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
mp_obj_webrepl_t *self = MP_OBJ_TO_PTR(self_in);
const mp_stream_p_t *sock_stream = mp_get_stream(self->sock);
mp_uint_t out_sz = sock_stream->read(self->sock, buf, size, errcode);
//DEBUG_printf("webrepl: Read %d initial bytes from websocket\n", out_sz);
// DEBUG_printf("webrepl: Read %d initial bytes from websocket\n", out_sz);
if (out_sz == 0 || out_sz == MP_STREAM_ERROR) {
return out_sz;
}
Expand Down
2 changes: 1 addition & 1 deletion extmod/network_cyw43.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ STATIC int network_cyw43_scan_cb(void *env, const cyw43_ev_scan_result_t *res) {
MP_OBJ_NEW_SMALL_INT(res->channel),
MP_OBJ_NEW_SMALL_INT(res->rssi),
MP_OBJ_NEW_SMALL_INT(res->auth_mode),
//mp_const_false, // hidden
// mp_const_false, // hidden
MP_OBJ_NEW_SMALL_INT(1), // N
};
mp_obj_list_append(list, mp_obj_new_tuple(6, tuple));
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ int snprintf(char *str, size_t size, const char *fmt, ...) {
return ret;
}

#endif //MICROPY_USE_INTERNAL_PRINTF
#endif // MICROPY_USE_INTERNAL_PRINTF
2 changes: 1 addition & 1 deletion lib/utils/pyexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ typedef struct _repl_t {
// but it was moved to MP_STATE_VM(repl_line) as containing
// root pointer. Still keep structure in case more state
// will be added later.
//vstr_t line;
// vstr_t line;
bool cont_line;
bool paste_mode;
} repl_t;
Expand Down
2 changes: 1 addition & 1 deletion mpy-cross/gccollect.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ void gc_collect(void) {
gc_collect_end();
}

#endif //MICROPY_ENABLE_GC
#endif // MICROPY_ENABLE_GC
2 changes: 1 addition & 1 deletion mpy-cross/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ typedef long mp_off_t;
#else
#define MP_SSIZE_MAX _I32_MAX
#endif
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)(p)) //Avoid compiler warning about different const qualifiers
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void *)(p)) // Avoid compiler warning about different const qualifiers
#define restrict
#define inline __inline
#define alignof(t) __alignof(t)
Expand Down
2 changes: 1 addition & 1 deletion ports/cc3200/mptask.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/machine_hw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/modesp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/modmachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/modnetwork.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/network_lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion ports/esp32/nimble.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion ports/esp8266/esp_mphal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions ports/esp8266/esppwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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")))

Expand Down Expand Up @@ -58,15 +58,15 @@ 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) ? \
(((t) >> 2) * ((APB_CLK_FREQ >> 4) / 250000) + ((t) & 0x3) * ((APB_CLK_FREQ >> 4) / 1000000)) : \
(((t) * (APB_CLK_FREQ >> 4)) / 1000000)) : \
0)

//FRC1
// FRC1
#define FRC1_ENABLE_TIMER BIT7

typedef enum {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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];
Expand Down
20 changes: 10 additions & 10 deletions ports/esp8266/ets_alt_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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) {
Expand All @@ -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();
}
Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
2 changes: 1 addition & 1 deletion ports/esp8266/hspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ports/esp8266/machine_pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) },
Expand Down
2 changes: 1 addition & 1 deletion ports/esp8266/machine_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion ports/esp8266/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (;;) {
Expand Down
2 changes: 1 addition & 1 deletion ports/esp8266/modesp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ports/esp8266/modmachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 84fa331

Please sign in to comment.