Skip to content

Commit 2b7c0fc

Browse files
committed
[ISSUE-34]: cleanup and some srcdoc
1 parent c48f720 commit 2b7c0fc

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

examples/0uart/defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 SZIGETI János
2+
* Copyright 2025 SZIGETI János
33
*
44
* This file is part of Bilis ESP32 Basic, which is released under GNU General Public License.version 3.
55
* See LICENSE or <https://www.gnu.org/licenses/> for full license details.

examples/0uart/uartprint.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@
66
*/
77
#include <stdbool.h>
88
#include <inttypes.h>
9-
#include <stdio.h>
10-
#include <string.h>
11-
#include <ctype.h>
129

13-
#include "gpio.h"
1410
#include "main.h"
1511
#include "defines.h"
16-
#include "typeaux.h"
17-
#include "print.h"
1812
#include "uart.h"
1913
#include "utils/uartutils.h"
2014

src/utils/uartutils.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@
2222
#include "uartutils.h"
2323
#include "typeaux.h"
2424

25-
#define BUFFER_SIZE 100
25+
#define BUFFER_SIZE 128
2626

27+
/**
28+
* printf with UART TX buffer as destination.
29+
* The UART TX buffer is fed via FIFO register byte-by-byte.
30+
* @param psUART UART controller (destiny).
31+
* @param pcFormat Format string.
32+
* @param ... printf arguments
33+
* @return number of sent bytes.
34+
*/
2735
int uart_printf(UART_Type *psUART, const char *pcFormat, ...) {
2836
char acBuf[BUFFER_SIZE];
2937
va_list va;

0 commit comments

Comments
 (0)