Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
// Copyright © 2024, Julian Scheffers, see LICENSE for more information
#pragma once
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#ifndef __cplusplus
#define __restrict restrict
#else
#define __restrict
#endif
// Callback from printf to output one or more characters.
// Returns how many characters were printed, or -1 on error.
typedef int (*printf_cb_t)(char const *__restrict __msg, size_t __len, void *__restrict __cookie);
// Write formatted output to UART0.
extern int printf(char const *__restrict __format, ...);
// Write formatted output to UART0, given va_list.
extern int vprintf(char const *__restrict __format, __builtin_va_list __arg);
// Write a number of formatted chars to `__s`.
extern int snprintf(char *__restrict __s, size_t __maxlen, char const *__restrict __format, ...)
__attribute__((__format__(__printf__, 3, 4)));
// Write a number of formatted chars to `__s`, given va_list.
extern int vsnprintf(char *__restrict __s, size_t __maxlen, char const *__restrict __format, __builtin_va_list __arg)
__attribute__((__format__(__printf__, 3, 0)));
// Underlying printf implementation.
// Returns how many characters were printed, or -1 on error.
extern int
printf_impl(char const *__restrict __format, __builtin_va_list __arg, printf_cb_t __cb, void *__restrict __cookie);
511328c3aThis file is pinned to the selected release. Download the original to open it in your design tool.