1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/// This crate contains a variety of universal error types which can be used to universally model
/// conditions which can typically arise for certain peripherals.
///
/// When used by HAL implementations, they allow drivers and applications alike to generically
/// handle those situations without the error handling being specific to the hardware it is
/// supposed to run on (which is usually not possible to implement in drivers).
///
/// All of the enums in this crate are marked as `#[non_exhaustive]` to allow for additions of new
/// error kinds without requiring a breaking change and version bump.
/// A SPI specific error.
///
/// This error type contains errors specific to SPI peripherals. Also it has an `Impl` kind to pass
/// through implementation specific errors occuring while trying to use a SPI peripheral.
/// An I2C specific error.
///
/// This error type contains errors specific to I2C peripherals. Also it has an `Impl` kind to pass
/// through implementation specific errors occuring while trying to use an I2C peripheral.
/// A universal implementation specific error.
///
/// These error kinds can be used to signal implementation specific errors unrelated to the
/// specific peripheral. This will be used for all sorts of connectivity problems, e.g. if an
/// adapter to the peripheral is used or the target peripheral is connected to indirectly (like bus
/// expanders) or an operating system is controlling the access and denying access.