Skip to content

Commit

Permalink
u8 as default Serial Word
Browse files Browse the repository at this point in the history
  • Loading branch information
burrbull committed Nov 3, 2021
1 parent 63dc712 commit 4f5c8f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Use `u8` as default SPI Word type
- Use `u8` as default SPI as Serial Word type

### Added
- Added `Can` Controller Area Network traits.
Expand Down
2 changes: 1 addition & 1 deletion src/serial/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Implementing that marker trait will opt in your type into a blanket implementation.
/// Write half of a serial interface (blocking variant)
pub trait Write<Word> {
pub trait Write<Word = u8> {
/// The type of error that can occur when writing
type Error: crate::serial::Error;

Expand Down
4 changes: 2 additions & 2 deletions src/serial/nb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
///
/// Some serial interfaces support different data sizes (8 bits, 9 bits, etc.);
/// This can be encoded in this trait via the `Word` type parameter.
pub trait Read<Word> {
pub trait Read<Word = u8> {
/// Read error
type Error: crate::serial::Error;

Expand All @@ -21,7 +21,7 @@ impl<T: Read<Word>, Word> Read<Word> for &mut T {
}

/// Write half of a serial interface
pub trait Write<Word> {
pub trait Write<Word = u8> {
/// Write error
type Error: crate::serial::Error;

Expand Down

0 comments on commit 4f5c8f6

Please sign in to comment.