Skip to content

Commit

Permalink
embedded-hal: 1.0.0-rc.1 -> 1.0.0-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed Dec 28, 2023
1 parent cff9130 commit 6fa2820
Show file tree
Hide file tree
Showing 27 changed files with 87 additions and 89 deletions.
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ edition = "2021"

[dependencies]
embedded-graphics-core = { version = "0.4", optional = true }
embedded-hal = { version = "1.0.0-rc.1" }
embedded-hal = "1.0.0-rc.3"
bit_field = "0.10.1"

[dev-dependencies]
embedded-graphics = "0.8"

embedded-hal-mock = { git = "https://github.com/newAM/embedded-hal-mock", branch = "eh1-rc.1", default-features = false, features = [
embedded-hal-mock = { version = "=0.10.0-rc.4", default-features = false, features = [
"eh1",
] }
# embedded-hal-mock = "0.9"

[target.'cfg(unix)'.dev-dependencies]
# linux-embedded-hal = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/epd1in54_no_graphics.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![deny(warnings)]

use embedded_hal::delay::DelayUs;
use embedded_hal::delay::DelayNs;
use epd_waveshare::{epd1in54::Epd1in54, prelude::*};
use linux_embedded_hal::{
spidev::{self, SpidevOptions},
Expand Down
2 changes: 1 addition & 1 deletion examples/epd2in13_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use embedded_graphics::{
primitives::{Circle, Line, PrimitiveStyle},
text::{Baseline, Text, TextStyleBuilder},
};
use embedded_hal::delay::DelayUs;
use embedded_hal::delay::DelayNs;
use epd_waveshare::{
color::*,
epd2in13_v2::{Display2in13, Epd2in13},
Expand Down
2 changes: 1 addition & 1 deletion examples/epd2in13bc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use embedded_graphics::{
primitives::{Circle, Line, PrimitiveStyle},
text::{Baseline, Text, TextStyleBuilder},
};
use embedded_hal::delay::DelayUs;
use embedded_hal::delay::DelayNs;
use epd_waveshare::{
color::*,
epd2in13bc::{Display2in13bc, Epd2in13bc},
Expand Down
2 changes: 1 addition & 1 deletion examples/epd4in2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use embedded_graphics::{
primitives::{Circle, Line, PrimitiveStyleBuilder},
text::{Baseline, Text, TextStyleBuilder},
};
use embedded_hal::delay::DelayUs;
use embedded_hal::delay::DelayNs;
use epd_waveshare::{
color::*,
epd4in2::{Display4in2, Epd4in2},
Expand Down
2 changes: 1 addition & 1 deletion examples/epd4in2_variable_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use embedded_graphics::{
primitives::{Circle, Line, PrimitiveStyleBuilder},
text::{Baseline, Text, TextStyleBuilder},
};
use embedded_hal::delay::DelayUs;
use embedded_hal::delay::DelayNs;
use epd_waveshare::{
color::*,
epd4in2::{self, Epd4in2},
Expand Down
6 changes: 3 additions & 3 deletions src/epd1in54/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
self.interface.reset(delay, 10_000, 10_000);
Expand Down Expand Up @@ -149,7 +149,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn width(&self) -> u32 {
Expand Down Expand Up @@ -300,7 +300,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
pub(crate) fn use_full_frame(
&mut self,
Expand Down
6 changes: 3 additions & 3 deletions src/epd1in54_v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
self.interface.reset(delay, 10_000, 10_000);
Expand Down Expand Up @@ -94,7 +94,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn width(&self) -> u32 {
Expand Down Expand Up @@ -267,7 +267,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
pub(crate) fn use_full_frame(
&mut self,
Expand Down
8 changes: 4 additions & 4 deletions src/epd1in54b/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
self.interface.reset(delay, 10_000, 10_000);
Expand Down Expand Up @@ -96,7 +96,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn update_color_frame(
&mut self,
Expand Down Expand Up @@ -146,7 +146,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn new(
Expand Down Expand Up @@ -324,7 +324,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)
Expand Down
8 changes: 4 additions & 4 deletions src/epd1in54c/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// Based on Reference Program Code from:
Expand Down Expand Up @@ -83,7 +83,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn update_color_frame(
&mut self,
Expand Down Expand Up @@ -128,7 +128,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn new(
Expand Down Expand Up @@ -265,7 +265,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in13_v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
use embedded_hal::{
delay::DelayUs,
delay::DelayNs,
digital::{InputPin, OutputPin},
spi::SpiDevice,
};
Expand Down Expand Up @@ -87,7 +87,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// HW reset
Expand Down Expand Up @@ -180,7 +180,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn new(
Expand Down Expand Up @@ -392,7 +392,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
/// When using partial refresh, the controller uses the provided buffer for
/// comparison with new buffer.
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in13bc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// Values taken from datasheet and sample code
Expand Down Expand Up @@ -147,7 +147,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn update_color_frame(
&mut self,
Expand Down Expand Up @@ -198,7 +198,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = TriColor;
fn new(
Expand Down Expand Up @@ -347,7 +347,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in7b/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// reset the device
Expand Down Expand Up @@ -119,7 +119,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn new(
Expand Down Expand Up @@ -280,7 +280,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn update_color_frame(
&mut self,
Expand Down Expand Up @@ -335,7 +335,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)
Expand Down
6 changes: 3 additions & 3 deletions src/epd2in9/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
self.interface.reset(delay, 10_000, 10_000);
Expand Down Expand Up @@ -142,7 +142,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn width(&self) -> u32 {
Expand Down Expand Up @@ -296,7 +296,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn use_full_frame(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// choose full frame/ram
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in9_v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
self.interface.reset(delay, 10_000, 2_000);
Expand Down Expand Up @@ -155,7 +155,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn width(&self) -> u32 {
Expand Down Expand Up @@ -297,7 +297,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn use_full_frame(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// choose full frame/ram
Expand Down Expand Up @@ -383,7 +383,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
/// To be followed immediately by `update_new_frame`.
fn update_old_frame(
Expand Down
8 changes: 4 additions & 4 deletions src/epd2in9bc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn init(&mut self, spi: &mut SPI, delay: &mut DELAY) -> Result<(), SPI::Error> {
// Values taken from datasheet and sample code
Expand Down Expand Up @@ -151,7 +151,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn update_color_frame(
&mut self,
Expand Down Expand Up @@ -202,7 +202,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
type DisplayColor = Color;
fn new(
Expand Down Expand Up @@ -351,7 +351,7 @@ where
BUSY: InputPin,
DC: OutputPin,
RST: OutputPin,
DELAY: DelayUs,
DELAY: DelayNs,
{
fn command(&mut self, spi: &mut SPI, command: Command) -> Result<(), SPI::Error> {
self.interface.cmd(spi, command)
Expand Down
Loading

0 comments on commit 6fa2820

Please sign in to comment.