#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) { } uint32_t logger_get_timestamp(void) { return 0; } int tftp_init(struct tftp_context* context) { UNUSED(context); 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) { return NULL; } err_t tcp_bind(void* pcb, void* ipaddr, uint16_t port) { UNUSED(pcb); UNUSED(ipaddr); UNUSED(port); return ERR_OK; } struct tcp_pcb* tcp_listen(void* pcb) { UNUSED(pcb); return NULL; } void tcp_accept(void* pcb, tcp_accept_fn arg) { UNUSED(pcb); UNUSED(arg); } void tcp_arg(void* pcb, void* arg) { UNUSED(pcb); UNUSED(arg); } void tcp_sent(void* pcb, void* arg) { UNUSED(pcb); UNUSED(arg); } void tcp_recv(void* pcb, tcp_recv_fn arg) { UNUSED(pcb); UNUSED(arg); } void tcp_setprio(void* pcb, uint8_t prio) { UNUSED(pcb); UNUSED(prio); } void tcp_err(void* pcb, void* err) { UNUSED(pcb); UNUSED(err); } void tcp_poll(void* pcb, void* poll, uint8_t interval) { UNUSED(pcb); UNUSED(poll); UNUSED(interval); } void tcp_close(void* pcb) { UNUSED(pcb); } 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); } void tcp_recved(void* pcb, uint16_t len) { UNUSED(pcb); UNUSED(len); } size_t tcp_sndbuf(void* pcb) { UNUSED(pcb); return 0; } 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; }