Fixed 0a getting converted to 0d 0a
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <pico/stdio.h>
|
||||
#include "crc.h"
|
||||
#include "stdio.h"
|
||||
|
||||
@@ -58,15 +59,22 @@ enum {
|
||||
TSTATE_BUILD_MSG,
|
||||
};
|
||||
|
||||
inline void send_tRespState(tRespState *resp) {
|
||||
static inline void write_raw(void* data, size_t n) {
|
||||
const uint8_t* a = data;
|
||||
for(size_t i = 0; i < n; i++){
|
||||
putchar_raw(a[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void send_tRespState(tRespState *resp) {
|
||||
resp->crc = crcFooter(*resp);
|
||||
fwrite(resp, 1, sizeof(tRespState), stdout);
|
||||
write_raw(resp, sizeof(tRespState));
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
inline void send_tRespEndCalib(tRespEndCalib *state) {
|
||||
static inline void send_tRespEndCalib(tRespEndCalib *state) {
|
||||
state->crc = crcFooter(*state);
|
||||
fwrite(state, 1, sizeof(tRespEndCalib), stdout);
|
||||
write_raw(state, sizeof(tRespEndCalib));
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user