Compare commits

..

No commits in common. "7d74f62c00f0f840382f4472ccda34bf1ed327b9" and "f96b8ffcb9e3ccc6e7015d6cf7770012da9f6518" have entirely different histories.

4 changed files with 6 additions and 7 deletions

View File

@ -238,6 +238,9 @@ static uint32_t butterfly_get_memsize(struct multiboot * p_mboot,
* ************************************************************************* */
static void butterfly_close_device(bfly_privdata_t * p_priv)
{
/* delay close() / tcsetattr() */
usleep(100000);
tcsetattr(p_priv->fd, TCSANOW, &p_priv->oldtio);
close(p_priv->fd);
} /* butterfly_close_device */
@ -265,10 +268,9 @@ static int butterfly_open_device(bfly_privdata_t * p_priv)
struct termios newtio;
memset(&newtio, 0, sizeof(newtio));
newtio.c_iflag = IGNBRK;
newtio.c_cflag = (CS8 | CREAD | CLOCAL);
cfsetispeed(&newtio, SERIAL_BAUDRATE);
cfsetospeed(&newtio, SERIAL_BAUDRATE);
newtio.c_iflag |= IGNBRK;
newtio.c_cflag |= SERIAL_BAUDRATE | CS8 | CLOCAL | CREAD;
newtio.c_cc[VMIN] = 1;
newtio.c_cc[VTIME] = 0;
@ -280,9 +282,6 @@ static int butterfly_open_device(bfly_privdata_t * p_priv)
return -1;
}
/* needed for some slow USB2Serial adapters */
usleep(200000);
return 0;
} /* butterlfy_open_device */

View File

View File

View File