diff options
| author | tomaz-suller <[email protected]> | 2025-08-26 11:08:57 +0200 |
|---|---|---|
| committer | tomaz-suller <[email protected]> | 2025-08-26 11:08:57 +0200 |
| commit | 621c394f25bfde56ffb2ba450782a02ae5febe68 (patch) | |
| tree | c12115cc2612ad6ce17cec1839d39725126d32a5 /embassy-stm32 | |
| parent | 551aa5770fccba09ccaaa78745a3e5af2faea964 (diff) | |
stm32/sai: make NODIV independent of MCKDIV
Diffstat (limited to 'embassy-stm32')
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index 524e01be7..2f6160cb1 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -602,6 +602,7 @@ pub struct Config { | |||
| 602 | pub clock_strobe: ClockStrobe, | 602 | pub clock_strobe: ClockStrobe, |
| 603 | pub output_drive: OutputDrive, | 603 | pub output_drive: OutputDrive, |
| 604 | pub master_clock_divider: MasterClockDivider, | 604 | pub master_clock_divider: MasterClockDivider, |
| 605 | pub nodiv: bool, | ||
| 605 | pub is_high_impedance_on_inactive_slot: bool, | 606 | pub is_high_impedance_on_inactive_slot: bool, |
| 606 | pub fifo_threshold: FifoThreshold, | 607 | pub fifo_threshold: FifoThreshold, |
| 607 | pub companding: Companding, | 608 | pub companding: Companding, |
| @@ -631,6 +632,7 @@ impl Default for Config { | |||
| 631 | frame_sync_definition: FrameSyncDefinition::ChannelIdentification, | 632 | frame_sync_definition: FrameSyncDefinition::ChannelIdentification, |
| 632 | frame_length: 32, | 633 | frame_length: 32, |
| 633 | master_clock_divider: MasterClockDivider::MasterClockDisabled, | 634 | master_clock_divider: MasterClockDivider::MasterClockDisabled, |
| 635 | nodiv: false, | ||
| 634 | clock_strobe: ClockStrobe::Rising, | 636 | clock_strobe: ClockStrobe::Rising, |
| 635 | output_drive: OutputDrive::Immediately, | 637 | output_drive: OutputDrive::Immediately, |
| 636 | is_high_impedance_on_inactive_slot: false, | 638 | is_high_impedance_on_inactive_slot: false, |
| @@ -900,7 +902,7 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> { | |||
| 900 | w.set_mono(config.stereo_mono.mono()); | 902 | w.set_mono(config.stereo_mono.mono()); |
| 901 | w.set_outdriv(config.output_drive.outdriv()); | 903 | w.set_outdriv(config.output_drive.outdriv()); |
| 902 | w.set_mckdiv(config.master_clock_divider.mckdiv().into()); | 904 | w.set_mckdiv(config.master_clock_divider.mckdiv().into()); |
| 903 | w.set_nodiv(config.master_clock_divider == MasterClockDivider::MasterClockDisabled); | 905 | w.set_nodiv(config.nodiv); |
| 904 | w.set_dmaen(true); | 906 | w.set_dmaen(true); |
| 905 | }); | 907 | }); |
| 906 | 908 | ||
