8000 capsules: kv: Support 512 byte KV values by alistair23 · Pull Request #4248 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

capsules: kv: Support 512 byte KV values #4248

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

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions boards/components/src/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};};
Expand Down Expand Up @@ -52,15 +52,15 @@ impl<V: hil::kv::KVPermissions<'static>> Component for KVDriverComponent<V> {
type StaticInput = (
&'static mut MaybeUninit<KVStoreDriver<'static, V>>,
&'static mut MaybeUninit<[u8; 64]>,
&'static mut MaybeUninit<[u8; 256]>,
&'static mut MaybeUninit<[u8; 512]>,
);
type Output = &'static KVStoreDriver<'static, V>;

fn finalize(self, static_buffer: Self::StaticInput) -> Self::Output {
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,
Expand Down
Loading
0