diff options
author | xengineering <me@xengineering.eu> | 2024-06-01 12:48:44 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-06-01 12:48:44 +0200 |
commit | 7d7280a5b162800ef72d48a8a3d2afb4f0496b85 (patch) | |
tree | 457e8f20f98e638239b6f66c84995026f71ebf0a /firmware/src/data_link.h | |
parent | 010cf768c20c71603172ae4c300ce3d571863141 (diff) | |
download | iot-core-7d7280a5b162800ef72d48a8a3d2afb4f0496b85.tar iot-core-7d7280a5b162800ef72d48a8a3d2afb4f0496b85.tar.zst iot-core-7d7280a5b162800ef72d48a8a3d2afb4f0496b85.zip |
This only covers the correct frame size, setting the buffer to 0 and
copy the payload over.
Missing is:
- copy destination address
- copy source address
- set frame type
- calculate and add CRC32 checksum
Diffstat (limited to 'firmware/src/data_link.h')
-rw-r--r-- | firmware/src/data_link.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/src/data_link.h b/firmware/src/data_link.h index d2a25a1..45f58dc 100644 --- a/firmware/src/data_link.h +++ b/firmware/src/data_link.h @@ -9,6 +9,9 @@ #define DL_SLIP_ESC_END 0xDC #define DL_SLIP_ESC_ESC 0xDD +#define DL_MAX_FRAME_SIZE 1500 + +ssize_t dl_encode_frame(uint8_t *payload, size_t len, uint8_t *dst); void dl_send_frame(const struct device *const uart_dev, uint8_t *buffer, size_t len); |