From 37bac916e7dd7159fe731f313859e31e743f7f23 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 8 Mar 2017 11:29:27 -0500 Subject: basecmd: Generalize the "move queue" runtime storage Detect the maximum size of each "move queue" item during the configuration phase instead of using the stepper move struct. This allows the stepper code to be contained entirely in stepper.c and it allows for future run time allocations from other types of objects. Signed-off-by: Kevin O'Connor --- src/basecmd.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/basecmd.h') diff --git a/src/basecmd.h b/src/basecmd.h index e5719c6f..b795e4db 100644 --- a/src/basecmd.h +++ b/src/basecmd.h @@ -3,16 +3,9 @@ #include // uint8_t -struct move { - uint32_t interval; - int16_t add; - uint16_t count; - struct move *next; - uint8_t flags; -}; - -void move_free(struct move *m); -struct move *move_alloc(void); +void move_free(void *m); +void *move_alloc(void); +void move_request_size(int size); void *lookup_oid(uint8_t oid, void *type); void *alloc_oid(uint8_t oid, void *type, uint16_t size); void *next_oid(uint8_t *i, void *type); -- cgit v1.2.3-70-g09d2