|
| 1 | +/* |
| 2 | + * Copyright (c) 2024, Niklas Hauser |
| 3 | + * |
| 4 | + * This file is part of the modm project. |
| 5 | + * |
| 6 | + * This Source Code Form is subject to the terms of the Mozilla Public |
| 7 | + * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 8 | + * file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 9 | + */ |
| 10 | +// ---------------------------------------------------------------------------- |
| 11 | + |
| 12 | +#include <stdarg.h> |
| 13 | +#include <stddef.h> |
| 14 | +#include <modm/architecture/utils.hpp> |
| 15 | + |
| 16 | +// ---------------------------------------------------------------------------- |
| 17 | +modm_weak modm_section("{{ no_printf_section }}") |
| 18 | +int vprintf(const char* format, va_list arg) |
| 19 | +{ |
| 20 | + (void) format; |
| 21 | + (void) arg; |
| 22 | + return 0; |
| 23 | +} |
| 24 | + |
| 25 | +modm_weak modm_section("{{ no_printf_section }}") |
| 26 | +int vsnprintf(char* s, size_t n, const char* format, va_list arg) |
| 27 | +{ |
| 28 | + (void) s; |
| 29 | + (void) n; |
| 30 | + (void) format; |
| 31 | + (void) arg; |
| 32 | + return 0; |
| 33 | +} |
| 34 | + |
| 35 | +modm_weak modm_section("{{ no_printf_section }}") |
| 36 | +int vsprintf(char* s, const char* format, va_list arg) |
| 37 | +{ |
| 38 | + (void) s; |
| 39 | + (void) format; |
| 40 | + (void) arg; |
| 41 | + return 0; |
| 42 | +} |
| 43 | + |
| 44 | +modm_weak modm_section("{{ no_printf_section }}") |
| 45 | +int vfctprintf(void (*out)(char c, void* extra_arg), void* extra_arg, const char* format, va_list arg) |
| 46 | +{ |
| 47 | + (void) out; |
| 48 | + (void) extra_arg; |
| 49 | + (void) format; |
| 50 | + (void) arg; |
| 51 | + return 0; |
| 52 | +} |
| 53 | + |
| 54 | +modm_weak modm_section("{{ no_printf_section }}") |
| 55 | +int printf(const char* format, ...) |
| 56 | +{ |
| 57 | + (void) format; |
| 58 | + return 0; |
| 59 | +} |
| 60 | + |
| 61 | +modm_weak modm_section("{{ no_printf_section }}") |
| 62 | +int sprintf(char* s, const char* format, ...) |
| 63 | +{ |
| 64 | + (void) s; |
| 65 | + (void) format; |
| 66 | + return 0; |
| 67 | +} |
| 68 | + |
| 69 | +modm_weak modm_section("{{ no_printf_section }}") |
| 70 | +int snprintf(char* s, size_t n, const char* format, ...) |
| 71 | +{ |
| 72 | + (void) s; |
| 73 | + (void) n; |
| 74 | + (void) format; |
| 75 | + return 0; |
| 76 | +} |
| 77 | + |
| 78 | +modm_weak modm_section("{{ no_printf_section }}") |
| 79 | +int fctprintf(void (*out)(char c, void* extra_arg), void* extra_arg, const char* format, ...) |
| 80 | +{ |
| 81 | + (void) out; |
| 82 | + (void) extra_arg; |
| 83 | + (void) format; |
| 84 | + return 0; |
| 85 | +} |
0 commit comments