Skip to content

Commit

Permalink
Change reset line high output to no output
Browse files Browse the repository at this point in the history
  • Loading branch information
GMMan authored and tve committed Jan 20, 2020
1 parent 09474e6 commit 75448fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions serial/serbridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ telnetUnwrap(serbridgeConnData *conn, uint8_t *inBuf, int len)
break;
case DTR_OFF:
if (mcu_reset_pin >= 0) {
GPIO_OUTPUT_SET(mcu_reset_pin, 1);
GPIO_DIS_OUTPUT(mcu_reset_pin);
os_delay_us(100L);
}
break;
Expand Down Expand Up @@ -267,7 +267,7 @@ serbridgeReset()
#endif
GPIO_OUTPUT_SET(mcu_reset_pin, 0);
os_delay_us(2000L); // esp8266 needs at least 1ms reset pulse, it seems...
GPIO_OUTPUT_SET(mcu_reset_pin, 1);
GPIO_DIS_OUTPUT(mcu_reset_pin);
}
#ifdef SERBR_DBG
else { os_printf("MCU reset: no pin\n"); }
Expand Down Expand Up @@ -332,7 +332,7 @@ serbridgeRecvCb(void *arg, char *data, unsigned short len)
os_delay_us(100L);
if (mcu_isp_pin >= 0) GPIO_OUTPUT_SET(mcu_isp_pin, 0);
os_delay_us(2000L);
if (mcu_reset_pin >= 0) GPIO_OUTPUT_SET(mcu_reset_pin, 1);
if (mcu_reset_pin >= 0) GPIO_DIS_OUTPUT(mcu_reset_pin);
//os_delay_us(100L);
//if (mcu_isp_pin >= 0) GPIO_OUTPUT_SET(mcu_isp_pin, 1);
os_delay_us(1000L); // wait a millisecond before writing to the UART below
Expand Down Expand Up @@ -498,7 +498,7 @@ serbridgeDisconCb(void *arg)
os_delay_us(100L);
GPIO_OUTPUT_SET(mcu_reset_pin, 0);
os_delay_us(100L);
GPIO_OUTPUT_SET(mcu_reset_pin, 1);
GPIO_DIS_OUTPUT(mcu_reset_pin);
}
conn->conn = NULL;
}
Expand Down Expand Up @@ -580,7 +580,7 @@ serbridgeInitPins()

// 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);
if (mcu_reset_pin >= 0) GPIO_DIS_OUTPUT(mcu_reset_pin);
// 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);
Expand Down

0 comments on commit 75448fd

Please sign in to comment.