Skip to content

Commit 289b4af

Browse files
committed
Allow constructing async-only I2CInterface
1 parent 3a16182 commit 289b4af

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

i2c/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ pub struct I2CInterface<I2C> {
2222
data_byte: u8,
2323
}
2424

25-
impl<I2C> I2CInterface<I2C>
26-
where
27-
I2C: embedded_hal::i2c::I2c,
28-
{
25+
impl<I2C> I2CInterface<I2C> {
2926
/// Create new I2C interface for communication with a display driver
3027
pub fn new(i2c: I2C, addr: u8, data_byte: u8) -> Self {
3128
Self {
@@ -36,7 +33,7 @@ where
3633
}
3734

3835
/// Consume the display interface and return
39-
/// the underlying peripherial driver
36+
/// the underlying peripheral driver
4037
pub fn release(self) -> I2C {
4138
self.i2c
4239
}

spi/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<SPI, DC> SPIInterface<SPI, DC> {
129129
}
130130

131131
/// Consume the display interface and return
132-
/// the underlying peripherial driver and GPIO pins used by it
132+
/// the underlying peripheral driver and GPIO pins used by it
133133
pub fn release(self) -> (SPI, DC) {
134134
(self.spi, self.dc)
135135
}

0 commit comments

Comments
 (0)