add pbuf_copy_partial moc so I don't need if TESTING preprocessor directive
This commit is contained in:
2023-11-30 10:17:57 +01:00
parent f16e92b7d8
commit d7ff0010bd
3 changed files with 10 additions and 6 deletions

View File

@@ -148,4 +148,9 @@ size_t tcp_sndbuf(void* pcb) {
void pbuf_free(struct pbuf* p) {
UNUSED(p);
}
uint16_t pbuf_copy_partial(const struct pbuf* buf, void* dataptr, uint16_t len, uint16_t offset) {
memcpy(dataptr, ((uint8_t*)(buf->payload)) + offset, len);
return len;
}