From 24f70ce139563b4b0510c07975b5dc17893336db Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Fri, 22 Nov 2024 11:24:19 +1000 Subject: [PATCH] capsules: kv: Support 512 byte KV values Some of the new LoRaWAN examples are writing more then 256 bytes, so let's up the buffer size to allow larger payloads. Signed-off-by: Alistair Francis --- boards/components/src/kv.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boards/components/src/kv.rs b/boards/components/src/kv.rs index ad69d7240e..746d4aeb12 100644 --- a/boards/components/src/kv.rs +++ b/boards/components/src/kv.rs @@ -24,7 +24,7 @@ macro_rules! kv_driver_component_static { ($V:ty $(,)?) => {{ let kv = kernel::static_buf!(capsules_extra::kv_driver::KVStoreDriver<'static, $V>); let key_buffer = kernel::static_buf!([u8; 64]); - let value_buffer = kernel::static_buf!([u8; 256]); + let value_buffer = kernel::static_buf!([u8; 512]); (kv, key_buffer, value_buffer) };}; @@ -52,7 +52,7 @@ impl> Component for KVDriverComponent { type StaticInput = ( &'static mut MaybeUninit>, &'static mut MaybeUninit<[u8; 64]>, - &'static mut MaybeUninit<[u8; 256]>, + &'static mut MaybeUninit<[u8; 512]>, ); type Output = &'static KVStoreDriver<'static, V>; @@ -60,7 +60,7 @@ impl> Component for KVDriverComponent { let grant_cap = create_capability!(capabilities::MemoryAllocationCapability); let key_buffer = static_buffer.1.write([0; 64]); - let value_buffer = static_buffer.2.write([0; 256]); + let value_buffer = static_buffer.2.write([0; 512]); let driver = static_buffer.0.write(KVStoreDriver::new( self.kv,