1
0
Fork 0

Upgrade to bleeding edge profirust

This commit is contained in:
rahix 2026-05-30 13:32:42 +02:00
parent e437b22644
commit c4a16810d5
3 changed files with 9 additions and 8 deletions

6
Cargo.lock generated
View file

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "aho-corasick" name = "aho-corasick"
@ -310,8 +310,8 @@ checksum = "1c1de5542ea7a8e8654e93e3d00b28c1f3318f95b0f270240685c9eeeb300986"
[[package]] [[package]]
name = "profirust" name = "profirust"
version = "0.2.0" version = "0.6.0"
source = "git+https://github.com/rahix/profirust.git?rev=6274541806f2b5fb8cfdffb641ca8fa452806c81#6274541806f2b5fb8cfdffb641ca8fa452806c81" source = "git+https://github.com/rahix/profirust.git?rev=0a1396c3ef44aa479f1ba9d7586c86f0b9621a0e#0a1396c3ef44aa479f1ba9d7586c86f0b9621a0e"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"bitvec", "bitvec",

View file

@ -12,7 +12,7 @@ process-image = "0.2.1"
[dependencies.profirust] [dependencies.profirust]
# version = 0.2.0 # version = 0.2.0
git = "https://github.com/rahix/profirust.git" git = "https://github.com/rahix/profirust.git"
rev = "6274541806f2b5fb8cfdffb641ca8fa452806c81" rev = "0a1396c3ef44aa479f1ba9d7586c86f0b9621a0e"
default-features = false default-features = false
features = ["phy-linux", "std"] features = ["phy-linux", "std"]

View file

@ -144,10 +144,10 @@ fn fieldbus_task(fieldbus_data: Arc<Mutex<FieldbusInner>>) {
dp::Peripheral::new( dp::Peripheral::new(
RIO_ADDRESS, RIO_ADDRESS,
options, options,
&mut buffer_inputs, &mut buffer_inputs[..],
&mut buffer_outputs, &mut buffer_outputs[..],
) )
.with_diag_buffer(&mut buffer_diagnostics), .with_diag_buffer(&mut buffer_diagnostics[..]),
); );
peripherals.push(PeripheralInfo { peripherals.push(PeripheralInfo {
@ -175,7 +175,8 @@ fn fieldbus_task(fieldbus_data: Arc<Mutex<FieldbusInner>>) {
loop { loop {
let now = profirust::time::Instant::now(); let now = profirust::time::Instant::now();
let events = fdl.poll(now, &mut phy, &mut dp_master); fdl.poll(now, &mut phy, &mut dp_master);
let events = dp_master.take_last_events();
{ {
let mut data = fieldbus_data.lock().unwrap(); let mut data = fieldbus_data.lock().unwrap();