aboutsummaryrefslogtreecommitdiff
path: root/src/print.rs
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-08-19 21:22:18 -0700
committerChristian Cunningham <cc@localhost>2022-08-19 21:22:18 -0700
commit26ab71043d97c1b06bdd252378b64171cb95b1a9 (patch)
tree9bea25574fc20e77a4faae6811add97e0a248175 /src/print.rs
parent0d061dac9e31831e4fe426a0df777463043868d7 (diff)
Updated docs
Diffstat (limited to 'src/print.rs')
-rw-r--r--src/print.rs13
1 files changed, 9 insertions, 4 deletions
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"));