use remote-utils facilities for baud_rate

This commit is contained in:
K. Richard Pixley
1993-09-14 19:34:15 +00:00
parent fc77365385
commit a94abe5bb7
5 changed files with 26 additions and 26 deletions

View File

@ -117,6 +117,7 @@ NINDY ROM monitor at the other end of the line.
#include "nindy-share/stop.h"
#include "dcache.h"
#include "remote-utils.h"
static DCACHE *nindy_dcache;
@ -179,6 +180,7 @@ nindy_open (name, from_tty)
char *name; /* "/dev/ttyXX", "ttyXX", or "XX": tty to be opened */
int from_tty;
{
char baudrate[1024];
if (!name)
error_no_arg ("serial port device name");
@ -193,7 +195,8 @@ nindy_open (name, from_tty)
/* Allow user to interrupt the following -- we could hang if there's
no NINDY at the other end of the remote tty. */
immediate_quit++;
ninConnect(name, baud_rate ? baud_rate : "9600",
sprintf(baudrate, "%d", sr_get_baud_rate());
ninConnect(name, baudrate,
nindy_initial_brk, !from_tty, nindy_old_protocol);
immediate_quit--;
@ -222,8 +225,8 @@ nindy_detach (name, from_tty)
static void
nindy_files_info ()
{
printf("\tAttached to %s at %s bps%s%s.\n", savename,
baud_rate? baud_rate: "9600",
printf("\tAttached to %s at %d bps%s%s.\n", savename,
sr_get_baud_rate(),
nindy_old_protocol? " in old protocol": "",
nindy_initial_brk? " with initial break": "");
}