Skip to content

Commit

Permalink
simplify type signature, distinguish state vs feature
Browse files Browse the repository at this point in the history
  • Loading branch information
AdinAck committed Aug 26, 2024
1 parent 21eab92 commit 545af80
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 72 deletions.
5 changes: 3 additions & 2 deletions examples/cordic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ extern crate cortex_m;
extern crate cortex_m_rt as rt;
extern crate stm32g4xx_hal as hal;

use fixed::types::{I1F15, I1F31};
use fixed::types::I1F15;
use hal::cordic::{
func::{dynamic::Mode as _, scale::N0, Magnitude, SinCos, Sqrt},
prec::P60,
types::{Q15, Q31},
Ext as _,
};
use hal::prelude::*;
Expand All @@ -33,7 +34,7 @@ fn main() -> ! {
let mut cordic = dp
.CORDIC
.constrain(&mut rcc)
.freeze::<I1F15, I1F31, SinCos, P60>(); // 16 bit arguments, 32 bit results, compute sine and cosine, 60 iterations
.freeze::<Q15, Q31, SinCos, P60>(); // 16 bit arguments, 32 bit results, compute sine and cosine, 60 iterations

// static operation (zero overhead)

Expand Down
Loading

0 comments on commit 545af80

Please sign in to comment.