#fixed-point #filter #cic #no-std

no-std cic-fixed

CIC filter implementation for fixed point numbers

3 unstable releases

0.5.1 Sep 20, 2023
0.4.1 Sep 5, 2023
0.4.0 Apr 18, 2023

#545 in Embedded development

Download history 24/week @ 2024-02-15 25/week @ 2024-02-22 1/week @ 2024-02-29 46/week @ 2024-03-07 76/week @ 2024-03-14 2/week @ 2024-03-21 30/week @ 2024-03-28 22/week @ 2024-04-04

53 downloads per month

MIT/Apache

14KB
253 lines

cic-fixed

Cargo Documentation

A CIC filter implementation for fixed point numbers.
Implemented for use in converting PDM to PCM.

WIP

  • CIC decimation filter
  • CIC interpolation filter

no_std

cic-fixed works with no_std by default. No setup is needed.


lib.rs:

cic-fixed

A CIC filter implementation for fixed point numbers.
Implemented for use in converting PDM to PCM.

Example

use cic_fixed::CicDecimationFilter;

let mut filter = CicDecimationFilter::<4, 2>::new();
let result = filter.process_sample(&0);
assert!(result.is_none());
let result = filter.process_sample(&1);
assert!(result.is_none());
let result = filter.process_sample(&2);
assert!(result.is_none());
let result = filter.process_sample(&3);
assert!(result.is_some());
assert_eq!(result.unwrap(), 10);

No runtime deps