I know that the "mini_printf" in the "printf.c" file within the "825x_BLE_SDK" is a port simulation.
I modified the source file to send this to UART DMA.
However, the basic C language header file was added as below to use the printf function.
An error occurs. Is there a solution?
#include <stdio.h>
#include <string.h>
Below are some of the codes I wrote to export string output using UART DMA.
voidcustomPrintFormat2(constchar *format, ...){
buf = malloc(sizeof(char) * MAX_BUF_SIZE);
fprintf(stderr, "Memory allocation Error: %s[line: %d]", __FUNCTION__, __LINE__);
sprintf(buf, "%s%c", buf, va_arg(ap, int));
sprintf(buf, "%s%d", buf, va_arg(ap, int));
sprintf(buf, "%s%f", buf, va_arg(ap, double));
sprintf(buf, "%s%lf", buf, va_arg(ap, double));
sprintf(buf, "%s%s", buf, va_arg(ap, char*));
sprintf(buf, "%s%%", buf);
sprintf(buf, "%s%c", buf, p);
uart_dma_send((unsigned char*)&buf);
Hi,
Please avoid using the stdio, and use the printf taht we implemented