Added documentation and changelog entries.
parent
132cae0e45
commit
271922a8b1
|
|
@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
|
||||
### Added
|
||||
|
||||
- Added support for positive and negatives modes of rendering in TriColor display in #92 (thanks to @akashihi)
|
||||
- Added Epd 5in83 V2 (B) support in #92 (thanks to @akashihi)
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ mod tests {
|
|||
use super::*;
|
||||
use crate::color::TriColor::Black;
|
||||
use crate::color::TriColor::Color;
|
||||
use crate::graphics::DisplayRotation;
|
||||
use crate::epd5in83b_v2;
|
||||
use crate::graphics::DisplayRotation;
|
||||
use embedded_graphics::{
|
||||
prelude::*,
|
||||
primitives::{Line, PrimitiveStyle},
|
||||
|
|
|
|||
|
|
@ -25,6 +25,14 @@ impl Default for DisplayRotation {
|
|||
}
|
||||
|
||||
/// Display specific pixel output configuration
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum DisplayColorRendering {
|
||||
/// Positive: chromatic doesn't override white, white bit cleared for black, white bit set for white, both bits set for chromatic
|
||||
|
|
@ -133,6 +141,15 @@ pub trait TriDisplay: DrawTarget<Color = TriColor> {
|
|||
/// Helperfunction for the Embedded Graphics draw trait
|
||||
///
|
||||
/// Becomes uneccesary when const_generics become stablised
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `width` - Screen width in pixels
|
||||
/// * `height` - Screen height in pixels
|
||||
/// * `pixel` - Pixel to draw
|
||||
/// * `rendering` - Chooses rendering mode for the color plane,
|
||||
/// whether it is positive or negative. Check [DisplayColorRendering] for details.
|
||||
/// This is a hardware defined setting, that needs to be checked from the datasheet.
|
||||
fn draw_helper_tri(
|
||||
&mut self,
|
||||
width: u32,
|
||||
|
|
|
|||
Loading…
Reference in New Issue