mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 01:08:00 -06:00
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>
This commit is contained in:
parent
affdbbf9ca
commit
37bac916e7
3 changed files with 86 additions and 42 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue