aboutsummaryrefslogtreecommitdiff
path: root/src/print.rs
diff options
context:
space:
mode:
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"));