Add inline // comments to all main.rs and board.rs boilerplate across 0x01-0x08 Rust drivers

- Add // comments to mod declarations, use imports, static items, and
  PICOTOOL_ENTRIES in all 8 main.rs files matching rp-hal template style
- Add //! file headers to all 8 board.rs files
- Add // comments to all board.rs use imports and HAL alias
- All 8 drivers build successfully, all 75 tests pass
This commit is contained in:
Kevin Thomas
2026-03-25 18:34:20 -04:00
parent 097b295f63
commit 279df2e408
16 changed files with 170 additions and 16 deletions
+6 -1
View File
@@ -25,9 +25,14 @@
//! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//! SOFTWARE.
//! @file board.rs
//! @brief Board-level HAL helpers for the UART driver
//! @author Kevin Thomas
//! @date 2025
// Alias our HAL crate
#[cfg(rp2350)]
use rp235x_hal as hal;
#[cfg(rp2040)]
use rp2040_hal as hal;
+10 -1
View File
@@ -40,28 +40,36 @@
#![no_std]
#![no_main]
// Board-level helpers: constants, type aliases, and init functions
mod board;
// UART driver module
mod uart;
// Debugging output over RTT
use defmt_rtt as _;
// Panic handler for RISC-V targets
#[cfg(target_arch = "riscv32")]
use panic_halt as _;
// Panic handler for ARM targets
#[cfg(target_arch = "arm")]
use panic_probe as _;
// HAL entry-point macro
use hal::entry;
// Alias our HAL crate
#[cfg(rp2350)]
use rp235x_hal as hal;
#[cfg(rp2040)]
use rp2040_hal as hal;
// Second-stage boot loader for RP2040
#[unsafe(link_section = ".boot2")]
#[used]
#[cfg(rp2040)]
pub static BOOT2: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080;
// Boot metadata for the RP2350 Boot ROM
#[unsafe(link_section = ".start_block")]
#[used]
#[cfg(rp2350)]
@@ -97,6 +105,7 @@ fn main() -> ! {
}
}
// Picotool binary info metadata
#[unsafe(link_section = ".bi_entries")]
#[used]
pub static PICOTOOL_ENTRIES: [hal::binary_info::EntryAddr; 5] = [