diff options
Diffstat (limited to 'embassy-stm32/src')
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index ce4bc43c3..579c34c13 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -394,7 +394,8 @@ pub struct Config { | |||
| 394 | pub frame_length: u16, | 394 | pub frame_length: u16, |
| 395 | pub clock_strobe: ClockStrobe, | 395 | pub clock_strobe: ClockStrobe, |
| 396 | pub output_drive: OutputDrive, | 396 | pub output_drive: OutputDrive, |
| 397 | pub master_clock_divider: Option<MasterClockDivider>, | 397 | pub master_clock_divider: MasterClockDivider, |
| 398 | pub nodiv: bool, | ||
| 398 | pub is_high_impedance_on_inactive_slot: bool, | 399 | pub is_high_impedance_on_inactive_slot: bool, |
| 399 | pub fifo_threshold: FifoThreshold, | 400 | pub fifo_threshold: FifoThreshold, |
| 400 | pub companding: Companding, | 401 | pub companding: Companding, |
| @@ -423,7 +424,8 @@ impl Default for Config { | |||
| 423 | frame_sync_active_level_length: word::U7(16), | 424 | frame_sync_active_level_length: word::U7(16), |
| 424 | frame_sync_definition: FrameSyncDefinition::ChannelIdentification, | 425 | frame_sync_definition: FrameSyncDefinition::ChannelIdentification, |
| 425 | frame_length: 32, | 426 | frame_length: 32, |
| 426 | master_clock_divider: None, | 427 | master_clock_divider: MasterClockDivider::DIV1, |
| 428 | nodiv: false, | ||
| 427 | clock_strobe: ClockStrobe::Rising, | 429 | clock_strobe: ClockStrobe::Rising, |
| 428 | output_drive: OutputDrive::Immediately, | 430 | output_drive: OutputDrive::Immediately, |
| 429 | is_high_impedance_on_inactive_slot: false, | 431 | is_high_impedance_on_inactive_slot: false, |
| @@ -677,8 +679,8 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> { | |||
| 677 | w.set_syncen(config.sync_input.syncen()); | 679 | w.set_syncen(config.sync_input.syncen()); |
| 678 | w.set_mono(config.stereo_mono.mono()); | 680 | w.set_mono(config.stereo_mono.mono()); |
| 679 | w.set_outdriv(config.output_drive.outdriv()); | 681 | w.set_outdriv(config.output_drive.outdriv()); |
| 680 | w.set_mckdiv(config.master_clock_divider.unwrap_or(MasterClockDivider::DIV1)); | 682 | w.set_mckdiv(config.master_clock_divider); |
| 681 | w.set_nodiv(config.master_clock_divider.is_none()); | 683 | w.set_nodiv(config.nodiv); |
| 682 | w.set_dmaen(true); | 684 | w.set_dmaen(true); |
| 683 | }); | 685 | }); |
| 684 | 686 | ||
