-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to as5600 with async feature, thanks @barafael. Unfortunately…
… it still panics on the .angle() method, although I suspect that it's not the crate's fault but probably AVR not supporting the returned u16 perhaps?: https://internals.rust-lang.org/t/adding-16-bit-pointer-support/2484... the post is about pointers not (stack or heap) values, so need to investigate further. Also adding a simavr wrapper: https://github.com/Patryk27/avr-tester
- Loading branch information
1 parent
bba2549
commit f21edb9
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// use avr_tester::*; | ||
|
||
// fn avr() -> AvrTester { | ||
// AvrTester::atmega328p() | ||
// .with_clock_of_16_mhz() | ||
// .load("target/atmega2560/debug/yourproject.elf") | ||
// } | ||
|
||
// // Assuming `yourproject` implements a ROT-13 encoder: | ||
|
||
// #[test] | ||
// fn short_text() { | ||
// let mut avr = avr(); | ||
|
||
// // Let's give our firmware a moment to initialize: | ||
// avr.run_for_ms(1); | ||
|
||
// // Now, let's send the string: | ||
// avr.uart0().write("Hello, World!"); | ||
|
||
// // ... give the AVR a moment to retrieve it & send back, encoded: | ||
// avr.run_for_ms(1); | ||
|
||
// // ... and, finally, let's assert the outcome: | ||
// assert_eq!("Uryyb, Jbeyq!", avr.uart0().read::<String>()); | ||
// } |