aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/__init__.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-02-14 20:47:08 -0500
committerKevin O'Connor <kevin@koconnor.net>2020-02-20 12:01:21 -0500
commitc6c360c4e14374a56dcb0477e1e7759683841093 (patch)
tree070667687291ab046f449127e37b8aeec7d74f5e /klippy/chelper/__init__.py
parent7b90830ae578544cf6ebe7bdbc70baea1f6b1509 (diff)
downloadkutter-c6c360c4e14374a56dcb0477e1e7759683841093.tar.gz
kutter-c6c360c4e14374a56dcb0477e1e7759683841093.tar.xz
kutter-c6c360c4e14374a56dcb0477e1e7759683841093.zip
serialqueue: Support notification of when a command is processed
Add ability for the host code to get a notification when the ack for a command sent to the micro-controller is received. This is in preparation for improved detection of message loss between mcu and host. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/__init__.py')
-rw-r--r--klippy/chelper/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
index c979340b..1a4b2d74 100644
--- a/klippy/chelper/__init__.py
+++ b/klippy/chelper/__init__.py
@@ -110,6 +110,7 @@ defs_serialqueue = """
uint8_t msg[MESSAGE_MAX];
int len;
double sent_time, receive_time;
+ uint64_t notify_id;
};
struct serialqueue *serialqueue_alloc(int serial_fd, int write_only);
@@ -118,7 +119,8 @@ defs_serialqueue = """
struct command_queue *serialqueue_alloc_commandqueue(void);
void serialqueue_free_commandqueue(struct command_queue *cq);
void serialqueue_send(struct serialqueue *sq, struct command_queue *cq
- , uint8_t *msg, int len, uint64_t min_clock, uint64_t req_clock);
+ , uint8_t *msg, int len, uint64_t min_clock, uint64_t req_clock
+ , uint64_t notify_id);
void serialqueue_pull(struct serialqueue *sq
, struct pull_queue_message *pqm);
void serialqueue_set_baud_adjust(struct serialqueue *sq