Skip to content

Commit 9418ae5

Browse files
authored
Add second undocumented IOSET: UndocIoSet2 (atsamd-rs#548)
1 parent ffddd8c commit 9418ae5

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

hal/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased Changes
22

3+
- Add additional undocumented but valid IOSet for ATSAMD5x/ATSAME5x
34
- Update PACs to v0.11.0 (#518)
45
- Improve the `bsp_pins!` macro (#475 & #483)
56
- Add undocumented but valid IOSet for ATSAMD5x/ATSAME5x (#506)

hal/src/sercom/v2/pad.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,15 @@ mod ioset {
292292
/// After implementing `IoSet` type checking, it became clear that some
293293
/// existing boards were using a combinations of pins that did not match any
294294
/// IOSET in the datasheet. From that, we infer that there must be at least
295-
/// one undocumented IOSET, and we added this new `IoSet` to account for it.
295+
/// two undocumented IOSETs, and we added these new `IoSet`s to account for
296+
/// it.
296297
///
297-
/// As of writing this documentation, only one undocumented IOSET has been
298-
/// discovered: PA16, PA17, PB22 & PB23 configured for `Sercom1`. Both the
298+
/// As of writing this documentation, only two undocumented IOSETs have been
299+
/// discovered:
300+
/// - PA16, PA17, PB22 & PB23 configured for `Sercom1`. Both the
299301
/// pygamer & feather_m4 uses this combination.
302+
/// - PA00, PA01, PB22 & PB23 configured for `Sercom1`. The itsybitsy_m4
303+
/// uses this combination.
300304
///
301305
/// See the [type-level enum] documentation for more details on type-level
302306
/// variants.
@@ -306,6 +310,10 @@ mod ioset {
306310
impl Sealed for UndocIoSet1 {}
307311
impl IoSet for UndocIoSet1 {}
308312

313+
pub enum UndocIoSet2 {}
314+
impl Sealed for UndocIoSet2 {}
315+
impl IoSet for UndocIoSet2 {}
316+
309317
/// Type class for SERCOM pads in a given [`IoSet`]
310318
///
311319
/// This trait is used to label each [`Pin`] implementing [`IsPad`] with its

hal/src/sercom/v2/pad/impl_pad_thumbv7em.rs

+8
Original file line numberDiff line numberDiff line change
@@ -435,3 +435,11 @@ impl InIoSet<UndocIoSet1> for Pin<PA16, Alternate<C>> {}
435435
impl InIoSet<UndocIoSet1> for Pin<PA17, Alternate<C>> {}
436436
impl InIoSet<UndocIoSet1> for Pin<PB22, Alternate<C>> {}
437437
impl InIoSet<UndocIoSet1> for Pin<PB23, Alternate<C>> {}
438+
439+
// Implement an undocumented `IoSet` for PA00, PA01, PB22 & PB23 configured for
440+
// `Sercom1`. The itsybitsy_m4 uses this combination, but it is not
441+
// listed as valid in the datasheet.
442+
impl InIoSet<UndocIoSet2> for Pin<PA00, Alternate<D>> {}
443+
impl InIoSet<UndocIoSet2> for Pin<PA01, Alternate<D>> {}
444+
impl InIoSet<UndocIoSet2> for Pin<PB22, Alternate<C>> {}
445+
impl InIoSet<UndocIoSet2> for Pin<PB23, Alternate<C>> {}

0 commit comments

Comments
 (0)