Commit Graph

7 Commits

Author SHA1 Message Date
Kevin Thomas 3604b3c921 refactor: enforce max 8 code lines, add docstrings, fix warnings across all Rust and C SDK projects
Rust (all 15 projects):
- Refactored overlength functions: format_counter, format_u8, format_f32_1,
  format_u32_minimal, gpio_drive, read_sensor, poll_sensor, format_round_trip,
  format_u32, prepare_write_buf, write_min_digits, write_temp, UartDriver::init,
  init_spi, angle_to_pulse_us, compute_servo_level
- Added 200+ docstrings to test functions, mock structs, impl blocks
- Fixed pub static comments (//) to doc comments (///) in all main.rs files
- Fixed helper function ordering (helpers above callers)
- Fixed Fn(u32) -> FnMut(u32) bound in button poll_button
- Moved OneShot trait import from main.rs to board.rs in adc project
- Added unsafe {} blocks in flash unsafe fn bodies (Rust 2024 edition)
- Removed unused hal::Clock imports from pwm/servo main.rs
- All 15 projects build with zero errors and zero warnings

C Pico SDK (all 15 projects):
- Added docstrings to all public functions, macros, and static variables
- All 15 projects rebuilt with zero errors

Cleanup:
- Removed build/ and target/ directories from git tracking
- Added target/ to .gitignore
- Deleted temporary fix_rust_docs.py script
2026-04-06 08:33:17 -04:00
Kevin Thomas 9834d5c96c Fixed Rust drivers 2026-04-02 11:36:06 -04:00
Kevin Thomas 0b207fd8b4 Add // comments to all use statements in driver .rs files
- Add // comments above top-level use imports in uart.rs, blink.rs, button.rs
- Add // comments above test module use imports (use super::*, Infallible,
  ErrorType) in all 8 driver .rs files
- All 8 drivers build, all 75 tests pass
2026-03-25 18:54:19 -04:00
Kevin Thomas 450f84ef75 Fix duplicate //! headers in board.rs, update @brief, add // comments to lib.rs pub mod
- Remove duplicate //! @file/@brief/@author/@date blocks from all 8 board.rs
- Update original @brief to consistent 'Board-level HAL helpers for the XXX driver'
- Add // comment above pub mod in all 7 lib.rs files
- All 8 drivers build, all 75 tests pass
2026-03-25 18:45:41 -04:00
Kevin Thomas 3fc502854a 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
2026-03-25 18:34:20 -04:00
Kevin Thomas db25706ae7 refactor(drivers): add board.rs module, slim main.rs, fix docstrings across all 8 Rust drivers
- Add board.rs to all 8 drivers: constants, type aliases, init functions,
  and HAL-specific helpers with full docstrings and pub(crate) visibility
- Slim main.rs to boilerplate + main() only, zero helper functions
- Fix i2c.rs: add file header, full docstrings on all functions
- Fix lcd1602.rs: add file header, full docstrings on all functions
- Fix lib.rs headers for 0x07 and 0x08
- All 8 drivers build and all 75 tests pass
2026-03-25 18:10:00 -04:00
Kevin Thomas 5d2767c42d Add 0x01_uart_rust driver and update README 2026-03-23 13:11:16 -04:00