Update tests so it uses llfs data and lffs
This commit is contained in:
2023-11-29 18:03:04 +01:00
parent 930034d146
commit b06ec97075
7 changed files with 231 additions and 48 deletions

View File

@@ -1,14 +1,7 @@
#include "mocs.h"
#include "tftp.h"
struct llfs_data_file llfs_root = {
.data = NULL,
.len = 0,
.name = "root",
.next = NULL,
};
void tftp_cleanup(void) {
}
uint32_t logger_get_timestamp(void) {
return 0;
@@ -19,28 +12,33 @@ int tftp_init(struct tftp_context* 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);
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(color);
UNUSED(bg_color);
UNUSED(font);
UNUSED(font);
printf("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) {
printf("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) {
printf("lcd_draw_gif_from_fs\n%s @%d %d\n", filename, x_pos, y_pos);
}
void lcd_clear_images(void) {
printf("lcd_clear_images\n");
}
void lcd_clear_text(void) {
printf("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);
printf("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) {
@@ -48,10 +46,84 @@ void lcd_draw_gif(uint8_t* gif_buff, size_t len, uint32_t x_pos, uint32_t y_pos)
UNUSED(len);
UNUSED(x_pos);
UNUSED(y_pos);
printf("lcd_draw_gif @ %d %d\n", x_pos, y_pos);
}
llfs_file_t* llfs_next_file(void** mem, char* filter) {
UNUSED(mem);
UNUSED(filter);
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);
printf("tcp_write:\n%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);
}