Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNS - CAN IO Trait #72

Merged
merged 30 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
64da3b6
CAN IO code
jpfbastos Jan 23, 2025
bcc58af
rustfmt
jpfbastos Jan 23, 2025
694c62a
added derive to the io file
jpfbastos Jan 23, 2025
d1831f5
added envelope struct, comments and the try_ functions
jpfbastos Jan 30, 2025
eed5c85
clippy is still flagging some stuff, but they seem to be edge cases
jpfbastos Jan 30, 2025
811fdba
see if it builds now
jpfbastos Jan 30, 2025
c2a93fc
matched embassy errors to CanError
jpfbastos Jan 30, 2025
14a49da
lol missed semicolon
jpfbastos Jan 30, 2025
8d55d2b
scrapped async because they're a pain
jpfbastos Jan 30, 2025
7fd9f24
removed blocking from Can
jpfbastos Jan 30, 2025
98f7ee8
Merge branch 'main' into hype-77-can-io-implementation
jpfbastos Jan 30, 2025
9ae813e
Merge branch 'main' into hype-77-can-io-implementation
davidbeechey Jan 30, 2025
102146f
restore lockfiles
davidbeechey Jan 30, 2025
f4754dd
fix big long import chains
davidbeechey Jan 30, 2025
6d520a6
fixed comment in definition of write_frame, de-nested some of the mat…
jpfbastos Feb 1, 2025
32279f1
fixed bug
jpfbastos Feb 1, 2025
bf3f270
ok my bad this should be it
jpfbastos Feb 1, 2025
f53e20d
:)
jpfbastos Feb 1, 2025
2d81bfa
remove hyped-can-derive (surely it can't be this straightforward)
jpfbastos Feb 5, 2025
6f48046
removed from cargo.toml
jpfbastos Feb 5, 2025
60467eb
and from io
jpfbastos Feb 5, 2025
16337b9
remove .lock files
jpfbastos Feb 5, 2025
8ce9ccb
og cargo.lock files for boards
jpfbastos Feb 6, 2025
3fe70e6
and the main one
jpfbastos Feb 6, 2025
f9bdf9c
ok this is it
jpfbastos Feb 6, 2025
c8460cb
actually no now this is it
jpfbastos Feb 6, 2025
f39d76d
ok now yes
jpfbastos Feb 6, 2025
cc26de1
start making `fail_read` and `fail_write` use mutex
davidbeechey Feb 6, 2025
e3649b0
david said sod it
jpfbastos Feb 6, 2025
05792f4
haha we're back
jpfbastos Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 30 additions & 9 deletions boards/stm32f767zi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions boards/stm32f767zi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ hyped_sensors = { path = "../../lib/sensors" }

hyped_adc = { path = "../../lib/io/hyped_adc" }
hyped_adc_derive = { path = "../../lib/io/hyped_adc/hyped_adc_derive" }
hyped_can = { path = "../../lib/io/hyped_can" }
hyped_i2c = { path = "../../lib/io/hyped_i2c" }
hyped_i2c_derive = { path = "../../lib/io/hyped_i2c/hyped_i2c_derive" }
hyped_gpio = { path = "../../lib/io/hyped_gpio" }
Expand Down
5 changes: 5 additions & 0 deletions boards/stm32f767zi/src/io.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
use core::cell::RefCell;
use embassy_stm32::adc::{Adc, AnyAdcChannel, Instance};
use embassy_stm32::can::{
enums::{BusError, FrameCreateError, TryReadError},
frame, Can, ExtendedId, Frame, Id, StandardId, TryWriteError,
};
use embassy_stm32::gpio::{Input, Output};
use embassy_stm32::{i2c::I2c, mode::Blocking};
use embassy_sync::blocking_mutex::{raw::NoopRawMutex, Mutex};

use hyped_adc::HypedAdc;
use hyped_adc_derive::HypedAdc;
use hyped_can::{CanError, HypedCan, HypedCanFrame, HypedEnvelope};
use hyped_gpio::{HypedGpioInputPin, HypedGpioOutputPin};
use hyped_gpio_derive::{HypedGpioInputPin, HypedGpioOutputPin};
use hyped_i2c::{HypedI2c, I2cError};
Expand Down
16 changes: 8 additions & 8 deletions boards/stm32l432kc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions boards/stm32l476rg/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions lib/io/hyped_can/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "hyped_can"
version = "0.1.0"
edition = "2021"

[dependencies]
heapless = "0.8.0"
embassy-sync = { version = "0.6.0", features = ["defmt"], git = "https://github.com/embassy-rs/embassy", rev = "1c466b81e6af6b34b1f706318cc0870a459550b7"}
embassy-time = { version = "0.3.1", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"], git = "https://github.com/embassy-rs/embassy", rev = "1c466b81e6af6b34b1f706318cc0870a459550b7"}
Loading
Loading