mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 04:08:04 -06:00
trsync: Introduce new "trigger synchronization" support
Separate out the stepper stopping code from endstop.c into its own trsync.c code file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
f3bd4e6acf
commit
05c2d51a12
7 changed files with 299 additions and 110 deletions
19
src/trsync.h
Normal file
19
src/trsync.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef __TRSYNC_H
|
||||
#define __TRSYNC_H
|
||||
|
||||
#include <stdint.h> // uint16_t
|
||||
|
||||
struct trsync_signal;
|
||||
typedef void (*trsync_callback_t)(struct trsync_signal *tss, uint8_t reason);
|
||||
|
||||
struct trsync_signal {
|
||||
struct trsync_signal *next;
|
||||
trsync_callback_t func;
|
||||
};
|
||||
|
||||
struct trsync *trsync_oid_lookup(uint8_t oid);
|
||||
void trsync_do_trigger(struct trsync *ts, uint8_t reason);
|
||||
void trsync_add_signal(struct trsync *ts, struct trsync_signal *tss
|
||||
, trsync_callback_t func);
|
||||
|
||||
#endif // trsync.h
|
Loading…
Add table
Add a link
Reference in a new issue