Skip to content

Commit a0497d7

Browse files
committed
Improve documentation of I2C bus error
1 parent f7ab7b1 commit a0497d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/i2c.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub trait Error: core::fmt::Debug {
119119
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
120120
#[non_exhaustive]
121121
pub enum ErrorKind {
122-
/// An unspecific bus error occurred
122+
/// Bus error occurred. e.g. A START or a STOP condition is detected and is not located after a multiple of 9 SCL clock pulses.
123123
Bus,
124124
/// The arbitration was lost, e.g. electrical problems with the clock signal
125125
ArbitrationLoss,
@@ -141,7 +141,7 @@ impl Error for ErrorKind {
141141
impl core::fmt::Display for ErrorKind {
142142
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
143143
match self {
144-
Self::Bus => write!(f, "An unspecific bus error occurred"),
144+
Self::Bus => write!(f, "Bus error occurred"),
145145
Self::ArbitrationLoss => write!(f, "The arbitration was lost"),
146146
Self::NoAcknowledge => write!(f, "A bus operation was not acknowledged"),
147147
Self::Overrun => write!(f, "The peripheral receive buffer was overrun"),

0 commit comments

Comments
 (0)