From adccb61e436cdfae1abe98871f426b6df9bb657c Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sat, 23 Oct 2021 17:25:41 +0800 Subject: [PATCH] services: llio: work around rkyv bug in rust 1.56 A bug in the type system appeared that prevents using constants in rkyv arrays. Hardcode the value instead. Signed-off-by: Sean Cross --- services/llio/src/api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/llio/src/api.rs b/services/llio/src/api.rs index 9e613ff9f..47f8be4d1 100644 --- a/services/llio/src/api.rs +++ b/services/llio/src/api.rs @@ -78,9 +78,9 @@ pub(crate) enum I2cCallback { pub struct I2cTransaction { pub bus_addr: u8, // write address and read address are encoded in the packet field below - pub txbuf: Option<[u8; I2C_MAX_LEN]>, // long enough for a 256-byte operation + 2 bytes of "register address" + pub txbuf: Option<[u8; 33]>, // long enough for a 256-byte operation + 2 bytes of "register address" pub txlen: u32, - pub rxbuf: Option<[u8; I2C_MAX_LEN]>, + pub rxbuf: Option<[u8; 33]>, pub rxlen: u32, pub listener: Option<(u32, u32, u32, u32)>, // where Rx split transactions should be routed to pub timeout_ms: u32,