Module capsules_extra::fm25cl

source ·
Expand description

SyscallDriver for the FM25CL FRAM chip.

http://www.cypress.com/part/fm25cl64b-dg

From the FM25CL website:

The FM25CL64B is a 64-Kbit nonvolatile memory employing an advanced ferroelectric process. A ferroelectric random access memory or F-RAM is nonvolatile and performs reads and writes similar to a RAM. It provides reliable data retention for 151 years while eliminating the complexities, overhead, and system level reliability problems caused by serial flash, EEPROM, and other nonvolatile memories.

§Usage


// Create a SPI device for this chip.
let fm25cl_spi = static_init!(
    capsules::virtual_spi::VirtualSpiMasterDevice<'static, usart::USART>,
    capsules::virtual_spi::VirtualSpiMasterDevice::new(mux_spi, Some(&sam4l::gpio::PA[25])));
// Setup the actual FM25CL driver.
let fm25cl = static_init!(
    capsules::fm25cl::FM25CL<'static,
    capsules::virtual_spi::VirtualSpiMasterDevice<'static, usart::USART>>,
    capsules::fm25cl::FM25CL::new(fm25cl_spi,
        &mut capsules::fm25cl::TXBUFFER, &mut capsules::fm25cl::RXBUFFER));
fm25cl_spi.set_client(fm25cl);

This capsule provides two interfaces:

  • hil::nonvolatile_storage::NonvolatileStorage
  • FM25CLCustom

The first is the generic interface for nonvolatile storage. This allows this driver to work with capsules like the nonvolatile_storage_driver that provide virtualization and a userspace interface. The second is a custom interface that exposes other chip-specific functions.

Structs§

Constants§

Traits§