From 26ab71043d97c1b06bdd252378b64171cb95b1a9 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Fri, 19 Aug 2022 21:22:18 -0700 Subject: Updated docs --- src/print.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/print.rs') diff --git a/src/print.rs b/src/print.rs index 932c655..88f39da 100644 --- a/src/print.rs +++ b/src/print.rs @@ -1,6 +1,7 @@ -//! Printing +//! # Printing to UART +//! +//! This module contains the macros to print formatted strings to UART. use core::fmt; - use crate::uart::UART_WRITER; use crate::console::interface::Write; @@ -9,13 +10,17 @@ pub fn _print(args: fmt::Arguments) { UART_WRITER.write_fmt(args).unwrap(); } -/// Print without newline +/// # Print without newline +/// +/// Print formatted arguments without a newline #[macro_export] macro_rules! print { ($($arg:tt)*) => ($crate::print::_print(format_args!($($arg)*))); } -/// Print with newline +/// # Print with newline +/// +/// Print formatted arguments with a newline #[macro_export] macro_rules! println { () => ($crate::print!("\n")); -- cgit v1.2.1