5 releases

0.2.3 Dec 5, 2024
0.2.2 Nov 28, 2024
0.2.1 Oct 25, 2024
0.2.0 Oct 18, 2024
0.1.0 May 3, 2024

#135 in #peripheral

Download history 436/week @ 2024-08-29 372/week @ 2024-09-05 91/week @ 2024-09-12 31/week @ 2024-09-19 272/week @ 2024-09-26 60/week @ 2024-10-03 87/week @ 2024-10-10 550/week @ 2024-10-17 490/week @ 2024-10-24 129/week @ 2024-10-31 222/week @ 2024-11-07 252/week @ 2024-11-14 356/week @ 2024-11-21 628/week @ 2024-11-28 641/week @ 2024-12-05 61/week @ 2024-12-12

1,694 downloads per month
Used in 12 crates (via atsamd-hal)

MIT/Apache

30KB
657 lines

This crate contains proc-macros to be used by the atsamd-hal crate. It is not intended to be used outside this crate, and no stability guarantees are made.

The main purpose of this crate is to separate the task of writing the code to support peripherals of the atsamd families from the task of figuring out which specific devices has those peripherals.

The actual mapping of devices to peripherals is specified in the devices.yaml file. In the atsamd-hal crate you then only need to care about the peripherals themselves (and their different variants).

To use the macros in this crate, you need to specify a peripheral expression, which can be one of the following:

  • A peripheral from devices.yaml in the form of a string. Examples: "serial-numbers" or "sercom3".
  • A peripheral from devices.yaml suffixed with the device family. Examples: "serial-numbers-d11" or "sercom3-d5x"
  • A pin from devices.yaml. Examples: "pb22".
  • An expression of the form any([peripheral expression], ...). Example: any("pm-d11", "pm-d21", "rstc-d5x").
  • An expression of the form all([peripheral expression], ...). Example: all("tc4", "tc5").

Dependencies

~275–620KB
~13K SLoC