Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
cmsis-dsp-sys
rust bindings for the prebuilt cmsis-dsp math
prereqs
Currently only requires unzip
and curl
cli commands. Happy to take prs to use pure rust instead. Downloads the cmsis math pack file during build.
usage
use ;
let sin = unsafe ;
assert_eq!;
the dirty details
Its complicated. Im currently not building any c files that accompany the arm dsp libraries. Bringing the necessary libc, libm and abstracting against every possible architecture and build flag seems hopeless atm. As a result you're going to have to do some work on your end.
When you start to do anything complicated you're probably going to see something like:
=
>>> referenced )
>>> arm_cmplx_mag_f32.o:()
Which means you need to bring some libm type function with you. Possibilitie pure rust options I've seen include libm or micromath with differing tradeoffs. Stub one in with:
use F32Ext;
//C needs access to a sqrt fn, lets use micromath
pub extern "C"
Further you're going to want to use something from arm_const_structs.c like arm_cfft_sR_f32_len16 which uses tables in arm_common_tables.c. I would look those up inside the cmsis pack and translate it into some arm_common_tables.rs file in your project
pub const ARMBITREVINDEXTABLE_16_TABLE_LENGTH: u16 = 20;
pub static armBitRevIndexTable16: & = &;
pub static twiddleCoef_16: & = &;
use ;
use ;
//your data as stored as real and imaginary pairs here
let mut dtfsecoef = ;
let cfft = arm_cfft_instance_f32 ;
let mut mag = ;
//Coefficient calculation with CFFT function
unsafe