Skip to content

Commit

Permalink
v0.6 doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
caemor committed Oct 28, 2024
1 parent d5c2029 commit 01e68b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ jobs:
build:

runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
strategy:
matrix:
rust:
Expand Down
2 changes: 1 addition & 1 deletion src/epd2in9d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//!
//! 参考[Waveshare](https://www.waveshare.net/wiki/2.9inch_e-Paper_HAT_%28D%29)的文档/例程进行构建
//!
//! Specification: https://www.waveshare.net/w/upload/b/b5/2.9inch_e-Paper_%28D%29_Specification.pdf
//! Specification: <https://www.waveshare.net/w/upload/b/b5/2.9inch_e-Paper_%28D%29_Specification.pdf>

use core::slice::from_raw_parts;

Expand Down
8 changes: 4 additions & 4 deletions src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ const fn line_bytes(width: u32, bits_per_pixel: usize) -> usize {
(width as usize * bits_per_pixel + 7) / 8
}

/// Display bffer used for drawing with embedded graphics
/// Display buffer used for drawing with embedded graphics
/// This can be rendered on EPD using ...
///
/// - WIDTH: width in pixel when display is not rotated
/// - HEIGHT: height in pixel when display is not rotated
/// - BWRBIT: mandatory value of the B/W when chromatic bit is set, can be any value for non
/// tricolor epd
/// - COLOR: color type used by the target display
/// - BYTECOUNT: This is redundant with prvious data and should be removed when const generic
/// - BYTECOUNT: This is redundant with previous data and should be removed when const generic
/// expressions are stabilized
///
/// More on BWRBIT:
///
/// Different chromatic displays differently treat the bits in chromatic color planes.
/// Some of them ([crate::epd2in13bc]) will render a color pixel if bit is set for that pixel,
/// which is a [DisplayColorRendering::Positive] mode.
/// which is a `BWRBIT = true` mode.
///
/// Other displays, like [crate::epd5in83b_v2] in opposite, will draw color pixel if bit is
/// cleared for that pixel, which is a [DisplayColorRendering::Negative] mode.
/// cleared for that pixel, which is a `BWRBIT = false` mode.
///
/// BWRBIT=true: chromatic doesn't override white, white bit cleared for black, white bit set for white, both bits set for chromatic
/// BWRBIT=false: chromatic does override white, both bits cleared for black, white bit set for white, red bit set for black
Expand Down

0 comments on commit 01e68b4

Please sign in to comment.