From 6cbad0d16000e5b8bf70c5baacfcf8e431a5566d Mon Sep 17 00:00:00 2001 From: Benjamin Runnels Date: Mon, 24 Aug 2015 13:47:36 -0500 Subject: [PATCH] Fixed merge misses --- serial/console.c | 51 ---------------------------------------------- serial/serbridge.c | 26 ----------------------- 2 files changed, 77 deletions(-) diff --git a/serial/console.c b/serial/console.c index 00a59d3..d0d0dd7 100644 --- a/serial/console.c +++ b/serial/console.c @@ -45,13 +45,8 @@ console_prev(void) { void ICACHE_FLASH_ATTR console_write_char(char c) { -<<<<<<< HEAD - //if (c == '\n' && console_prev() != '\r') console_write('\r'); // does more harm than good - console_write(c); -======= //if (c == '\n' && console_prev() != '\r') console_write('\r'); // does more harm than good console_write(c); ->>>>>>> master } int ICACHE_FLASH_ATTR @@ -88,51 +83,6 @@ ajaxConsoleBaud(HttpdConnData *connData) { int ICACHE_FLASH_ATTR ajaxConsole(HttpdConnData *connData) { -<<<<<<< HEAD - if (connData->conn==NULL) return HTTPD_CGI_DONE; // Connection aborted. Clean up. - char buff[2048]; - int len; // length of text in buff - int console_len = (console_wr+BUF_MAX-console_rd) % BUF_MAX; // num chars in console_buf - int start = 0; // offset onto console_wr to start sending out chars - - jsonHeader(connData, 200); - - // figure out where to start in buffer based on URI param - len = httpdFindArg(connData->getArgs, "start", buff, sizeof(buff)); - if (len > 0) { - start = atoi(buff); - if (start < console_pos) { - start = 0; - } else if (start >= console_pos+console_len) { - start = console_len; - } else { - start = start - console_pos; - } - } - - // start outputting - len = os_sprintf(buff, "{\"len\":%d, \"start\":%d, \"text\": \"", - console_len-start, console_pos+start); - - int rd = (console_rd+start) % BUF_MAX; - while (len < 2040 && rd != console_wr) { - uint8_t c = console_buf[rd]; - if (c == '\\' || c == '"') { - buff[len++] = '\\'; - buff[len++] = c; - } else if (c == '\r') { - // this is crummy, but browsers display a newline for \r\n sequences - } else if (c < ' ') { - len += os_sprintf(buff+len, "\\u%04x", c); - } else { - buff[len++] = c; - } - rd = (rd + 1) % BUF_MAX; - } - os_strcpy(buff+len, "\"}"); len+=2; - httpdSend(connData, buff, len); - return HTTPD_CGI_DONE; -======= if (connData->conn==NULL) return HTTPD_CGI_DONE; // Connection aborted. Clean up. char buff[2048]; int len; // length of text in buff @@ -176,7 +126,6 @@ ajaxConsole(HttpdConnData *connData) { os_strcpy(buff+len, "\"}"); len+=2; httpdSend(connData, buff, len); return HTTPD_CGI_DONE; ->>>>>>> master } void ICACHE_FLASH_ATTR consoleInit() { diff --git a/serial/serbridge.c b/serial/serbridge.c index f583ffe..415772b 100644 --- a/serial/serbridge.c +++ b/serial/serbridge.c @@ -334,31 +334,6 @@ static void ICACHE_FLASH_ATTR serbridgeConnectCb(void *arg) { //===== Initialization void ICACHE_FLASH_ATTR serbridgeInitPins() { -<<<<<<< HEAD - mcu_reset_pin = flashConfig.reset_pin; - mcu_isp_pin = flashConfig.isp_pin; - os_printf("Serbridge pins: reset=%d isp=%d swap=%d\n", - mcu_reset_pin, mcu_isp_pin, flashConfig.swap_uart); - - if (flashConfig.swap_uart) { - PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTCK_U, 4); - PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, 4); - PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTCK_U); - PIN_PULLUP_DIS(PERIPHS_IO_MUX_MTDO_U); - system_uart_swap(); - } else { - PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, 0); - PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, 0); - system_uart_de_swap(); - } - - // set both pins to 1 before turning them on so we don't cause a reset - if (mcu_isp_pin >= 0) GPIO_OUTPUT_SET(mcu_isp_pin, 1); - if (mcu_reset_pin >= 0) GPIO_OUTPUT_SET(mcu_reset_pin, 1); - // switch pin mux to make these pins GPIO pins - if (mcu_reset_pin >= 0) makeGpio(mcu_reset_pin); - if (mcu_isp_pin >= 0) makeGpio(mcu_isp_pin); -======= mcu_reset_pin = flashConfig.reset_pin; mcu_isp_pin = flashConfig.isp_pin; os_printf("Serbridge pins: reset=%d isp=%d swap=%d\n", @@ -382,7 +357,6 @@ void ICACHE_FLASH_ATTR serbridgeInitPins() { // switch pin mux to make these pins GPIO pins if (mcu_reset_pin >= 0) makeGpio(mcu_reset_pin); if (mcu_isp_pin >= 0) makeGpio(mcu_isp_pin); ->>>>>>> master } // Start transparent serial bridge TCP server on specified port (typ. 23)