diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-08 11:29:27 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-08 13:37:51 -0500 |
commit | 37bac916e7dd7159fe731f313859e31e743f7f23 (patch) | |
tree | 4456e490c9fc629b8c9ddf483fb19abb891adf89 /src/basecmd.h | |
parent | affdbbf9ca120da415aff2a8e8dea2847800ee39 (diff) | |
download | kutter-37bac916e7dd7159fe731f313859e31e743f7f23.tar.gz kutter-37bac916e7dd7159fe731f313859e31e743f7f23.tar.xz kutter-37bac916e7dd7159fe731f313859e31e743f7f23.zip |
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 <kevin@koconnor.net>
Diffstat (limited to 'src/basecmd.h')
-rw-r--r-- | src/basecmd.h | 13 |
1 files changed, 3 insertions, 10 deletions
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 <stdint.h> // 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); |