testing for tcp_cmd

add testing files
This commit is contained in:
2023-11-29 21:28:26 +01:00
committed by Sander Speetjens
parent 843c234bcf
commit 42675a5fe1
5 changed files with 305 additions and 8 deletions

View File

@@ -1,5 +1,11 @@
#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) {
}
@@ -22,28 +28,38 @@ void lcd_display_text(const char* text,
UNUSED(bg_color);
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);
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) {
printf("lcd_draw_img_from_fs\n%s @%d %d\n", filename, x_pos, 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) {
printf("lcd_draw_gif_from_fs\n%s @%d %d\n", filename, x_pos, 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) {
printf("lcd_clear_images\n");
dprint("lcd_clear_images\n");
}
void lcd_clear_text(void) {
printf("lcd_clear_text\n");
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);
printf("lcd_draw_bmp_img @ %d %d\n", x_pos, 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) {
@@ -52,7 +68,7 @@ void lcd_draw_gif(uint8_t* gif_buff, size_t len, uint32_t x_pos, uint32_t y_pos)
UNUSED(x_pos);
UNUSED(y_pos);
printf("lcd_draw_gif @ %d %d\n", x_pos, y_pos);
dprint("lcd_draw_gif @ %d %d\n", x_pos, y_pos);
}
struct tcp_pcb* tcp_new(void) {
@@ -112,7 +128,8 @@ void tcp_write(void* pcb, const char* data, size_t len, uint8_t apiflags) {
UNUSED(apiflags);
UNUSED(len);
printf("tcp_write:\n%s\n", data);
dprint("tcp_write:\n");
printf("%s\n", data);
}
void tcp_output(void* pcb) {