components

Module tickv

Source
Expand description

Component for TicKV KV System Driver.

This provides one component, TicKVComponent, which provides a system call inteface to non-volatile storage.

§Usage

   let flash_ctrl_read_buf = static_init!(
       [u8; lowrisc::flash_ctrl::PAGE_SIZE],
       [0; lowrisc::flash_ctrl::PAGE_SIZE]
   );
   let page_buffer = static_init!(
       lowrisc::flash_ctrl::LowRiscPage,
       lowrisc::flash_ctrl::LowRiscPage::default()
   );

   let mux_flash = components::tickv::FlashMuxComponent::new(&peripherals.flash_ctrl).finalize(
       components::flash_user_component_static!(lowrisc::flash_ctrl::FlashCtrl),
   );

   // SipHash
   let sip_hash = static_init!(
       capsules_extra::sip_hash::SipHasher24,
       capsules_extra::sip_hash::SipHasher24::new()
   );
   sip_hash.register();

   let tickv = components::tickv::TicKVComponent::new(
       sip_hash,
       &mux_flash,
       0x20040000 / lowrisc::flash_ctrl::PAGE_SIZE,
       0x40000,
       flash_ctrl_read_buf,
       page_buffer,
   )
   .finalize(components::tickv_component_static!(
       lowrisc::flash_ctrl::FlashCtrl,
       capsules_extra::sip_hash::SipHasher24
   ));
   hil::flash::HasClient::set_client(&peripherals.flash_ctrl, mux_flash);

Structs§

Type Aliases§