2018-06-06 23:49:44 +03:00
|
|
|
#ifndef STEPCOMPRESS_H
|
|
|
|
#define STEPCOMPRESS_H
|
|
|
|
|
|
|
|
#include <stdint.h> // uint32_t
|
|
|
|
|
|
|
|
#define ERROR_RET -989898989
|
|
|
|
|
2018-06-09 00:02:20 +03:00
|
|
|
struct stepcompress *stepcompress_alloc(uint32_t oid);
|
|
|
|
void stepcompress_fill(struct stepcompress *sc, uint32_t max_error
|
|
|
|
, uint32_t invert_sdir, uint32_t queue_step_msgid
|
|
|
|
, uint32_t set_next_step_dir_msgid);
|
2018-06-06 23:49:44 +03:00
|
|
|
void stepcompress_free(struct stepcompress *sc);
|
|
|
|
uint32_t stepcompress_get_oid(struct stepcompress *sc);
|
2018-06-09 02:55:24 +03:00
|
|
|
int stepcompress_get_step_dir(struct stepcompress *sc);
|
2020-02-25 05:59:39 +03:00
|
|
|
int stepcompress_append(struct stepcompress *sc, int sdir
|
|
|
|
, double print_time, double step_time);
|
2020-02-25 20:54:55 +03:00
|
|
|
int stepcompress_commit(struct stepcompress *sc);
|
2020-03-08 18:14:26 +03:00
|
|
|
int stepcompress_reset(struct stepcompress *sc, uint64_t last_step_clock);
|
|
|
|
int stepcompress_queue_msg(struct stepcompress *sc, uint32_t *data, int len);
|
2018-06-06 23:49:44 +03:00
|
|
|
|
|
|
|
struct serialqueue;
|
|
|
|
struct steppersync *steppersync_alloc(
|
|
|
|
struct serialqueue *sq, struct stepcompress **sc_list, int sc_num
|
|
|
|
, int move_num);
|
|
|
|
void steppersync_free(struct steppersync *ss);
|
|
|
|
void steppersync_set_time(struct steppersync *ss, double time_offset
|
|
|
|
, double mcu_freq);
|
|
|
|
int steppersync_flush(struct steppersync *ss, uint64_t move_clock);
|
|
|
|
|
|
|
|
#endif // stepcompress.h
|