-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! I2S - Inter-IC Sound Interface | ||
use nb; | ||
|
||
/// Full duplex | ||
pub trait FullDuplex<Word> { | ||
/// Error type | ||
type Error; | ||
|
||
/// Reads the left word and right word available. | ||
/// | ||
/// The order is in the result is `(left_word, right_word)` | ||
fn try_read(&mut self) -> nb::Result<(Word, Word), Self::Error>; | ||
|
||
/// Sends a left word and a right word to the slave. | ||
fn try_send(&mut self, left_word: Word, right_word: Word) -> nb::Result<(), Self::Error>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters