From 3025d8809efb188fa7e155320a3dcd40191760d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Tue, 23 Jul 2024 13:35:40 +0100
Subject: [PATCH] docs: new code documentation

Includes simple example in main gb.rs file.
---
 src/gb.rs  | 14 +++++++++++++-
 src/ppu.rs |  1 +
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/gb.rs b/src/gb.rs
index af8e2348..1f2d7429 100644
--- a/src/gb.rs
+++ b/src/gb.rs
@@ -1,4 +1,16 @@
-//! Main Game Boy emulation entrypoint functions and structures.
+//! Game Boy emulation entrypoint and associated functions and structures.
+//!
+//! Most of the meaningful publicly available functions and structures to build
+//! a working emulator should be present here.
+//!
+//! # Examples
+//!
+//! ```rust
+//! use boytacean::gb::GameBoy;
+//! let game_boy = GameBoy::new(None);
+//! game_boy.load(false).unwrap();
+//! game_boy.tick();
+//! ```
 
 use std::{
     collections::VecDeque,
diff --git a/src/ppu.rs b/src/ppu.rs
index a69bd019..af0fd2dd 100644
--- a/src/ppu.rs
+++ b/src/ppu.rs
@@ -343,6 +343,7 @@ pub struct PpuRegisters {
 /// Outputs the screen as a RGB 8 bit frame buffer.
 ///
 /// # Basic usage
+///
 /// ```rust
 /// use boytacean::ppu::Ppu;
 /// let mut ppu = Ppu::default();
-- 
GitLab