aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/serialqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/serialqueue.c')
-rw-r--r--klippy/serialqueue.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/klippy/serialqueue.c b/klippy/serialqueue.c
index 60ceeb4b..b3451ad6 100644
--- a/klippy/serialqueue.c
+++ b/klippy/serialqueue.c
@@ -770,11 +770,10 @@ background_thread(void *data)
// Create a new 'struct serialqueue' object
struct serialqueue *
-serialqueue_alloc(int serial_fd, double baud_adjust, int write_only)
+serialqueue_alloc(int serial_fd, int write_only)
{
struct serialqueue *sq = malloc(sizeof(*sq));
memset(sq, 0, sizeof(*sq));
- sq->baud_adjust = baud_adjust;
// Reactor setup
sq->serial_fd = serial_fd;
@@ -961,6 +960,14 @@ exit:
pthread_mutex_unlock(&sq->lock);
}
+void
+serialqueue_set_baud_adjust(struct serialqueue *sq, double baud_adjust)
+{
+ pthread_mutex_lock(&sq->lock);
+ sq->baud_adjust = baud_adjust;
+ pthread_mutex_unlock(&sq->lock);
+}
+
// Set the estimated clock rate of the mcu on the other end of the
// serial port
void