mirror of https://github.com/Desuuuu/klipper.git
command: Make command_add_frame() and command_encodef() static
The only users of these two functions are in command.c so they can be declared local to that code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
92e1481a52
commit
823fdc9cb4
|
@ -108,7 +108,7 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Encode a message
|
// Encode a message
|
||||||
uint_fast8_t
|
static uint_fast8_t
|
||||||
command_encodef(uint8_t *buf, const struct command_encoder *ce, va_list args)
|
command_encodef(uint8_t *buf, const struct command_encoder *ce, va_list args)
|
||||||
{
|
{
|
||||||
uint_fast8_t max_size = READP(ce->max_size);
|
uint_fast8_t max_size = READP(ce->max_size);
|
||||||
|
@ -172,7 +172,7 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add header and trailer bytes to a message block
|
// Add header and trailer bytes to a message block
|
||||||
void
|
static void
|
||||||
command_add_frame(uint8_t *buf, uint_fast8_t msglen)
|
command_add_frame(uint8_t *buf, uint_fast8_t msglen)
|
||||||
{
|
{
|
||||||
buf[MESSAGE_POS_LEN] = msglen;
|
buf[MESSAGE_POS_LEN] = msglen;
|
||||||
|
|
|
@ -74,9 +74,6 @@ enum {
|
||||||
void *command_decode_ptr(uint32_t v);
|
void *command_decode_ptr(uint32_t v);
|
||||||
uint8_t *command_parsef(uint8_t *p, uint8_t *maxend
|
uint8_t *command_parsef(uint8_t *p, uint8_t *maxend
|
||||||
, const struct command_parser *cp, uint32_t *args);
|
, const struct command_parser *cp, uint32_t *args);
|
||||||
uint_fast8_t command_encodef(uint8_t *buf, const struct command_encoder *ce
|
|
||||||
, va_list args);
|
|
||||||
void command_add_frame(uint8_t *buf, uint_fast8_t msglen);
|
|
||||||
uint_fast8_t command_encode_and_frame(
|
uint_fast8_t command_encode_and_frame(
|
||||||
uint8_t *buf, const struct command_encoder *ce, va_list args);
|
uint8_t *buf, const struct command_encoder *ce, va_list args);
|
||||||
void command_sendf(const struct command_encoder *ce, ...);
|
void command_sendf(const struct command_encoder *ce, ...);
|
||||||
|
|
Loading…
Reference in New Issue