lvbitfile2rust-cli-0.1.1 is not a library.
lvbitfile2rust
lvbitfile2rust generates static register maps from lvbitx files.
Invoking from the command line
|
Invoking as a macro
Generated code
lvbitfile2rust generates code with a similar interface to code generated by svd2rust. The generated code contains a struct named Peripherals
with an associated function named take
. Calling take
will attempt to open an FPGA session and return a Peripherals
instance. The Peripherals
instance contains fields for each register described by the input bitfile. These fields contain instances of structs corresponding to each register, with read
and possibly write
methods. In practice, the interface is rather straightforward to use:
use UnsignedFXP;
Generated code will depend on ni-fpga and ni-fpga-macros if the input bitfile uses Clusters or Enums.