From d2f15d69d7004a5360e7d4ab9311a6f6ac069337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 6 Dec 2024 14:36:20 +0100 Subject: [PATCH] Fix signal fn recommendation (#2692) --- documentation/API-GUIDELINES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/API-GUIDELINES.md b/documentation/API-GUIDELINES.md index 1dd23c835..535d2faa0 100644 --- a/documentation/API-GUIDELINES.md +++ b/documentation/API-GUIDELINES.md @@ -24,7 +24,7 @@ In general, the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines ## Construction and Destruction of Drivers - Drivers must take peripherals via the `PeripheralRef` pattern - they don't consume peripherals directly. -- If a driver requires pins, those pins must be configured using `fn with_signal_name(self, pin: impl Peripheral

+ 'd) -> Self)` or `fn with_signal_name(self, pin: impl Peripheral

+ 'd) -> Self)` +- If a driver requires pins, those pins should be configured using `fn with_signal_name(self, pin: impl Peripheral

+ 'd) -> Self` or `fn with_signal_name(self, pin: impl Peripheral

+ 'd) -> Self` - If a driver supports multiple peripheral instances (for example, I2C0 is one such instance): - The peripheral instance type must be positioned as the last type parameter of the driver type. - The peripheral instance type must default to a type that supports any of the peripheral instances.