Skip to content

Commit 056fc90

Browse files
committed
Add some missing docs
1 parent e5a8b96 commit 056fc90

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/display/image.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ impl GreyscaleImage {
2929
GreyscaleImage(*data)
3030
}
3131

32+
/// Construct a GreyscaleImage with all LEDs turned off.
3233
pub const fn blank() -> GreyscaleImage {
3334
GreyscaleImage([[0; 5]; 5])
3435
}

src/gpio.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! [v1.5 schematic](https://github.com/bbcmicrobit/hardware/tree/master/V1.5).
55
//! Where appropriate the pins are restricted with the appropriate `MODE`
66
//! from `nrf-hal`.
7-
#![allow(clippy::upper_case_acronyms)]
7+
#![allow(clippy::upper_case_acronyms, missing_docs)]
88
use crate::hal::gpio::{p0, Floating, Input, Output, PushPull};
99

1010
/* GPIO pads */
@@ -27,6 +27,7 @@ pub type ROW1 = p0::P0_13<Output<PushPull>>;
2727
pub type ROW2 = p0::P0_14<Output<PushPull>>;
2828
pub type ROW3 = p0::P0_15<Output<PushPull>>;
2929

30+
/// GPIO pins connected to the LED matrix
3031
pub struct DisplayPins {
3132
pub col1: COL1,
3233
pub col2: COL2,
@@ -42,6 +43,7 @@ pub struct DisplayPins {
4243
pub row3: ROW3,
4344
}
4445

46+
/// Create [DisplayPins] from a [GPIO Parts](crate::hal::gpio::p0::Parts)
4547
#[macro_export]
4648
macro_rules! display_pins {
4749
( $p0parts:expr ) => {{

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
//! microbit contains everything required to get started with the use of Rust
2+
//! to create firmwares for the fabulous [BBC micro:bit](https://microbit.org)
3+
//! microcontroller board.
14
#![no_std]
5+
#![deny(missing_docs)]
26
#![allow(non_camel_case_types)]
37

48
pub use hal::pac;
@@ -11,6 +15,7 @@ pub mod display;
1115
pub mod gpio;
1216
pub mod led;
1317

18+
/// Create a [Uart](hal::uart::Uart] client with the default pins
1419
#[macro_export]
1520
macro_rules! serial_port {
1621
( $gpio:expr, $uart:expr, $speed:expr ) => {{

0 commit comments

Comments
 (0)