mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-07-06 20:47:55 +02:00
Add // comments to all use statements in driver .rs files
- Add // comments above top-level use imports in uart.rs, blink.rs, button.rs - Add // comments above test module use imports (use super::*, Infallible, ErrorType) in all 8 driver .rs files - All 8 drivers build, all 75 tests pass
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
//! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
//! SOFTWARE.
|
||||
|
||||
// Embedded HAL digital I/O traits for GPIO pin control
|
||||
use embedded_hal::digital::{InputPin, OutputPin, StatefulOutputPin};
|
||||
|
||||
/// Push-button GPIO input driver with debounce.
|
||||
@@ -123,8 +124,11 @@ impl<L: OutputPin + StatefulOutputPin> ButtonLed<L> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
// Import all parent module items
|
||||
use super::*;
|
||||
// Infallible error type for mock pin implementations
|
||||
use core::convert::Infallible;
|
||||
// Error type trait for mock pin implementations
|
||||
use embedded_hal::digital::ErrorType;
|
||||
|
||||
struct MockInputPin {
|
||||
|
||||
Reference in New Issue
Block a user