Skip to content

Commit

Permalink
Fix wrong test
Browse files Browse the repository at this point in the history
  • Loading branch information
emeric-martineau committed Dec 27, 2024
1 parent 85e0936 commit 646a5ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "2.0.0"
authors = ["Emeric Martineau <[email protected]>"]
edition = "2021"
resolver = "2"
rust-version = "1.81"
rust-version = "1.77"
description = "Rewrite of power reader JSY-MK-194. Tested on ESP32"
homepage = "https://github.com/emeric-martineau/jsy_mk_194"
keywords = ["embedded", "JSY-MK-194", "Esp32", "embedded-hal v1"]
Expand Down
10 changes: 7 additions & 3 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use embedded_hal::blocking::delay::DelayMs;
use embedded_hal::delay::DelayNs;

/// When put this data in segment_read, Uart.read() return Ok
const READ_DATA_OK: [u8; crate::READ_DATA_SIZE] = [
Expand Down Expand Up @@ -86,10 +86,14 @@ impl crate::Uart for UartTestImpl {

struct DelayTestImpl {}

impl DelayMs<u16> for DelayTestImpl {
fn delay_ms(&mut self, _ms: u16) {
impl DelayNs for DelayTestImpl {
fn delay_ms(&mut self, _ms: u32) {
// Do nothing
}

fn delay_ns(&mut self, ns: u32) {
todo!()
}
}

fn setup(
Expand Down

0 comments on commit 646a5ca

Please sign in to comment.