mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Removed debugging helpers.
This commit is contained in:
34
termios2.c
34
termios2.c
@ -207,30 +207,12 @@ cf2setispeed_custom(struct termios *tios, int speed)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Helpers for debugging */
|
||||
/***************************************************************************/
|
||||
|
||||
void
|
||||
cf2showspeed(struct termios *tios)
|
||||
{
|
||||
printf("CB: %08o, CIB: %08o, ospeed = %d, ispeed = %d\r\n",
|
||||
tios->c_cflag & (CBAUD | CBAUDEX),
|
||||
(tios->c_cflag >> IBSHIFT) & (CBAUD | CBAUDEX),
|
||||
tios->c_ospeed,
|
||||
tios->c_ispeed);
|
||||
}
|
||||
|
||||
void
|
||||
tc2showspeed(int fd)
|
||||
{
|
||||
struct termios tios;
|
||||
int r;
|
||||
|
||||
r = tc2getattr(fd, &tios);
|
||||
if (r < 0) {
|
||||
printf("%d: Failed to get attrs: %s", fd, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
printf("%d: ", fd);
|
||||
cf2showspeed(&tios);
|
||||
}
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
|
15
termios2.h
15
termios2.h
@ -55,11 +55,16 @@ speed_t cf2getispeed(struct termios *tios);
|
||||
int cf2setispeed_custom(struct termios *tios, int speed);
|
||||
int cf2setospeed_custom(struct termios *tios, int speed);
|
||||
|
||||
/* Helpers for debugging */
|
||||
|
||||
void cf2showspeed(struct termios *tios);
|
||||
void tc2showspeed(int fd) ;
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
#endif /* of TERMIOS2_H */
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
*/
|
||||
|
Reference in New Issue
Block a user