Porting PicoTCP WIP

This commit is contained in:
2025-10-29 14:29:06 +01:00
parent 6722f42e68
commit 815c2239fe
464 changed files with 235009 additions and 24 deletions

View File

@ -0,0 +1,29 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "pico_faulty.h"
/* #warning "COMPILING for MEMORY TESTS!" */
uint32_t mm_failure_count = 0;
uint32_t cur_mem, max_mem;
static int called_atexit = 0;
void memory_stats(void)
{
fprintf(stderr, " ################ MAX MEMORY USED in this test: %u\n", max_mem);
}
int pico_set_mm_failure(uint32_t nxt)
{
if (!called_atexit) {
atexit(memory_stats);
called_atexit++;
}
mm_failure_count = nxt;
return 0;
}