1 // Copyright 2016 The Fuchsia Authors 2 // Copyright (c) 2008 Travis Geiselbrecht 3 // 4 // Use of this source code is governed by a MIT-style 5 // license that can be found in the LICENSE file or at 6 // https://opensource.org/licenses/MIT 7 8 #pragma once 9 10 #include <sys/types.h> 11 #include <stdbool.h> 12 #include <stdarg.h> 13 #include <zircon/compiler.h> 14 15 __BEGIN_CDECLS 16 17 void platform_debug_panic_start(void); 18 void platform_dputs_thread(const char* str, size_t len); 19 void platform_dputs_irq(const char* str, size_t len); 20 int platform_dgetc(char *c, bool wait); platform_dputc(char c)21static inline void platform_dputc(char c) { 22 platform_dputs_thread(&c, 1); 23 } 24 25 // Should be available even if the system has panicked. 26 void platform_pputc(char c); 27 int platform_pgetc(char *c, bool wait); 28 29 __END_CDECLS 30