modbus_tcp
add lwip_strerr fix tcp_close
This commit is contained in:
10
tests/mocs.c
10
tests/mocs.c
@@ -141,10 +141,11 @@ void tcp_poll(void* pcb, void* poll, uint8_t interval) {
|
||||
dprint("tcp_poll\n");
|
||||
}
|
||||
|
||||
void tcp_close(void* pcb) {
|
||||
err_t tcp_close(void* pcb) {
|
||||
UNUSED(pcb);
|
||||
|
||||
dprint("tcp_close\n");
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
void tcp_write(void* pcb, const char* data, size_t len, uint8_t apiflags) {
|
||||
@@ -185,4 +186,11 @@ void pbuf_free(struct pbuf* 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;
|
||||
}
|
||||
|
||||
const char* lwip_strerr(err_t err) {
|
||||
UNUSED(err);
|
||||
|
||||
dprint("lwip_sterr\n");
|
||||
return NULL;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void tcp_recv(void* pcb, tcp_recv_fn arg);
|
||||
void tcp_setprio(void* pcb, uint8_t prio);
|
||||
void tcp_err(void* pcb, void* err);
|
||||
void tcp_poll(void* pcb, void* poll, uint8_t interval);
|
||||
void tcp_close(void* pcb);
|
||||
err_t tcp_close(void* pcb);
|
||||
|
||||
void tcp_write(void* pcb, const char* data, size_t len, uint8_t apiflags);
|
||||
void tcp_output(void* pcb);
|
||||
@@ -131,6 +131,8 @@ size_t tcp_sndbuf(void* pcb);
|
||||
|
||||
uint16_t pbuf_copy_partial(const struct pbuf* buf, void* dataptr, uint16_t len, uint16_t offset);
|
||||
|
||||
const char* lwip_strerr(err_t err);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user