196 lines
3.7 KiB
C
196 lines
3.7 KiB
C
#include "mocs.h"
|
|
#include "tftp.h"
|
|
#include "mocs.h"
|
|
#ifdef DEBUG
|
|
#define dprint(fmt, ...) printf(fmt, ##__VA_ARGS__)
|
|
#else
|
|
#define dprint(fmt, ...)
|
|
#endif
|
|
|
|
void tftp_cleanup(void) {
|
|
dprint("tftp_cleanup\n");
|
|
}
|
|
uint32_t logger_get_timestamp(void) {
|
|
dprint("logger_get_timestamp\n");
|
|
|
|
return 0;
|
|
}
|
|
|
|
int tftp_init(struct tftp_context* context) {
|
|
UNUSED(context);
|
|
|
|
dprint("tftp_init\n");
|
|
return 0;
|
|
}
|
|
|
|
void lcd_display_text(uint8_t* text, uint16_t x_pos, uint16_t y_pos, uint32_t color, uint32_t bg_color, sFONT* font) {
|
|
UNUSED(text);
|
|
UNUSED(x_pos);
|
|
UNUSED(y_pos);
|
|
UNUSED(color);
|
|
UNUSED(bg_color);
|
|
UNUSED(font);
|
|
|
|
dprint("lcd_display_text @ %d %d with color 0x%08X bg color 0x%08X\n%s\n", x_pos, y_pos, color, bg_color, text);
|
|
}
|
|
|
|
void lcd_draw_img_from_fs(char* filename, uint32_t x_pos, uint32_t y_pos) {
|
|
UNUSED(filename);
|
|
UNUSED(x_pos);
|
|
UNUSED(y_pos);
|
|
|
|
dprint("lcd_draw_img_from_fs\n%s @%d %d\n", filename, x_pos, y_pos);
|
|
}
|
|
void lcd_draw_gif_from_fs(char* filename, uint32_t x_pos, uint32_t y_pos) {
|
|
UNUSED(filename);
|
|
UNUSED(x_pos);
|
|
UNUSED(y_pos);
|
|
|
|
dprint("lcd_draw_gif_from_fs\n%s @%d %d\n", filename, x_pos, y_pos);
|
|
}
|
|
|
|
void lcd_clear_images(void) {
|
|
dprint("lcd_clear_images\n");
|
|
}
|
|
|
|
void lcd_clear_text(void) {
|
|
dprint("lcd_clear_text\n");
|
|
}
|
|
|
|
void lcd_draw_bmp_img(uint8_t* bmp_buff, uint32_t x_pos, uint32_t y_pos) {
|
|
UNUSED(bmp_buff);
|
|
UNUSED(x_pos);
|
|
UNUSED(y_pos);
|
|
|
|
dprint("lcd_draw_bmp_img @ %d %d\n", x_pos, y_pos);
|
|
}
|
|
|
|
void lcd_draw_gif(uint8_t* gif_buff, size_t len, uint32_t x_pos, uint32_t y_pos) {
|
|
UNUSED(gif_buff);
|
|
UNUSED(len);
|
|
UNUSED(x_pos);
|
|
UNUSED(y_pos);
|
|
|
|
dprint("lcd_draw_gif @ %d %d\n", x_pos, y_pos);
|
|
}
|
|
|
|
struct tcp_pcb* tcp_new(void) {
|
|
dprint("tcp_new\n");
|
|
return NULL;
|
|
}
|
|
|
|
err_t tcp_bind(void* pcb, void* ipaddr, uint16_t port) {
|
|
UNUSED(pcb);
|
|
UNUSED(ipaddr);
|
|
UNUSED(port);
|
|
|
|
dprint("tcp_bind @ %d\n", port);
|
|
return ERR_OK;
|
|
}
|
|
|
|
struct tcp_pcb* tcp_listen(void* pcb) {
|
|
UNUSED(pcb);
|
|
|
|
dprint("tcp_listen\n");
|
|
return NULL;
|
|
}
|
|
|
|
void tcp_accept(void* pcb, tcp_accept_fn arg) {
|
|
UNUSED(pcb);
|
|
UNUSED(arg);
|
|
|
|
dprint("tcp_accept\n");
|
|
}
|
|
|
|
void tcp_arg(void* pcb, void* arg) {
|
|
UNUSED(pcb);
|
|
UNUSED(arg);
|
|
|
|
dprint("tcp_arg\n");
|
|
}
|
|
void tcp_sent(void* pcb, void* arg) {
|
|
UNUSED(pcb);
|
|
UNUSED(arg);
|
|
|
|
dprint("tcp_sent\n");
|
|
}
|
|
void tcp_recv(void* pcb, tcp_recv_fn arg) {
|
|
UNUSED(pcb);
|
|
UNUSED(arg);
|
|
|
|
dprint("tcp_recv\n");
|
|
}
|
|
|
|
void tcp_setprio(void* pcb, uint8_t prio) {
|
|
UNUSED(pcb);
|
|
UNUSED(prio);
|
|
|
|
dprint("tcp_setprio\n");
|
|
}
|
|
void tcp_err(void* pcb, void* err) {
|
|
UNUSED(pcb);
|
|
UNUSED(err);
|
|
|
|
dprint("tcp_err\n");
|
|
}
|
|
void tcp_poll(void* pcb, void* poll, uint8_t interval) {
|
|
UNUSED(pcb);
|
|
UNUSED(poll);
|
|
UNUSED(interval);
|
|
|
|
dprint("tcp_poll\n");
|
|
}
|
|
|
|
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) {
|
|
UNUSED(pcb);
|
|
UNUSED(apiflags);
|
|
UNUSED(len);
|
|
|
|
dprint("tcp_write:\n");
|
|
printf("%s\n", data);
|
|
}
|
|
|
|
void tcp_output(void* pcb) {
|
|
UNUSED(pcb);
|
|
|
|
dprint("tcp_output\n");
|
|
}
|
|
|
|
void tcp_recved(void* pcb, uint16_t len) {
|
|
UNUSED(pcb);
|
|
UNUSED(len);
|
|
|
|
dprint("tcp_recved\n");
|
|
}
|
|
|
|
size_t tcp_sndbuf(void* pcb) {
|
|
UNUSED(pcb);
|
|
|
|
dprint("tcp_sndbuf\n");
|
|
return 0;
|
|
}
|
|
|
|
void pbuf_free(struct pbuf* p) {
|
|
UNUSED(p);
|
|
|
|
dprint("pbuf_free\n");
|
|
}
|
|
|
|
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;
|
|
} |