Add UART Debugging code

This commit is contained in:
2026-05-28 17:02:45 +08:00
parent d744efedf0
commit 480f680726
4 changed files with 203 additions and 8 deletions
@@ -0,0 +1,20 @@
#ifndef __UART_IO_H_
#define __UART_IO_H_
#include <stdio.h>
#include "xparameters.h"
#include "platform.h"
#include "platform.h"
#include "xil_types.h"
#include "xil_printf.h"
// Command validation constants
#define CMD_LEN_MIN 1 // Command code only (minimum)
#define CMD_LEN_MAX 64 // Maximum reasonable command length
#define HEX_MAX_LEN 1024 // Buffer size for hex parsing (matches buffer[] size)
int String_HexToVal_Multi(const char* str, u8* hex, u16 hex_max);
int Console_In( char* str, int max_len );
int UART_RecvInstr(u8* recvbuffer);
#endif