From f65404cc05cba9c45f3f87ea53e637965b9e3164 Mon Sep 17 00:00:00 2001 From: Hierophect Date: Mon, 22 Jul 2019 13:04:31 -0400 Subject: [PATCH] Cleanup missed items --- shared-bindings/board/__init__.c | 18 +++++++++--------- supervisor/shared/safe_mode.c | 3 +-- supervisor/supervisor.mk | 5 ++--- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index 9107fc57fb..47e2d64bc8 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -65,11 +65,11 @@ mp_obj_t board_i2c(void) { MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); -// //| .. function:: SPI() -// //| -// //| Returns the `busio.SPI` object for the board designated SCK, MOSI and MISO pins. It is a -// //| singleton. -// //| +//| .. function:: SPI() +//| +//| Returns the `busio.SPI` object for the board designated SCK, MOSI and MISO pins. It is a +//| singleton. +//| #if BOARD_SPI mp_obj_t board_spi(void) { mp_obj_t singleton = common_hal_board_get_spi(); @@ -89,10 +89,10 @@ mp_obj_t board_spi(void) { #endif MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); -// //| .. function:: UART() -// //| -// //| Returns the `busio.UART` object for the board designated TX and RX pins. It is a singleton. -// //| +//| .. function:: UART() +//| +//| Returns the `busio.UART` object for the board designated TX and RX pins. It is a singleton. +//| #if BOARD_UART mp_obj_t board_uart(void) { mp_obj_t singleton = common_hal_board_get_uart(); diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 97b2d8d42c..d8d3ab379c 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -66,8 +66,7 @@ safe_mode_t wait_for_safe_mode_reset(void) { // Blink on for 100, off for 100, on for 100, off for 100 and on for 200 common_hal_digitalio_digitalinout_set_value(&status_led, diff > 100 && diff / 100 != 2 && diff / 100 != 4); #endif - diff = 0 - start_ticks; - //diff = ticks_ms - start_ticks; + diff = ticks_ms - start_ticks; } #ifdef MICROPY_HW_LED_STATUS common_hal_digitalio_digitalinout_deinit(&status_led); diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index b4d7e9d50c..2d50e7a8b1 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -10,9 +10,8 @@ SRC_SUPERVISOR = \ supervisor/shared/safe_mode.c \ supervisor/shared/stack.c \ supervisor/shared/status_leds.c \ - supervisor/shared/safe_mode.c \ - supervisor/shared/translate.c \ - + supervisor/shared/translate.c + ifndef $(NO_USB) NO_USB = $(wildcard supervisor/usb.c) endif