Cargo Features
[dependencies]
atsamd-hal = { version = "0.16.0", default-features = false, features = ["samd11c", "samd11d", "samd21e", "samd21g", "samd21j", "samd21el", "samd21gl", "samd51g", "samd51j", "samd51n", "samd51p", "same51g", "same51j", "same51n", "same53j", "same53n", "same54n", "same54p", "samd11c-rt", "samd11d-rt", "samd21e-rt", "samd21g-rt", "samd21j-rt", "samd21el-rt", "samd21gl-rt", "samd51g-rt", "samd51j-rt", "samd51n-rt", "samd51p-rt", "same51g-rt", "same51j-rt", "same51n-rt", "same53j-rt", "same53n-rt", "same54n-rt", "same54p-rt", "can", "dma", "enable_unsafe_aes_newblock_cipher", "max-channels", "rtic", "sdmmc", "unproven", "usb", "use_rtt", "defmt", "device", "library", "thumbv6", "thumbv7", "samd11", "samd21", "samd51", "same51", "same53", "same54", "has-pa00", "has-pa01", "has-pa27", "has-pa28", "has-pb01", "has-pb03", "has-pb05", "has-pb23", "pins-14", "pins-24", "pins-32", "pins-32a", "pins-32l", "pins-48", "pins-48a", "pins-48l", "pins-64", "pins-100", "pins-128", "pins-d11c", "pins-d11d", "pins-d21e", "pins-d21g", "pins-d21j", "pins-d21el", "pins-d21gl", "pins-d51g", "pins-d51j", "pins-d51n", "pins-d51p", "pins-e51g", "pins-e51j", "pins-e51n", "pins-e53j", "pins-e53n", "pins-e54n", "pins-e54p", "has-can0", "has-can1", "has-ethernet", "has-gmac", "has-i2s", "has-sdhc1", "has-sercom1", "has-sercom2", "has-sercom3", "has-sercom5", "has-sercom6", "has-sercom7", "has-tc0", "has-tc2", "has-tc3", "has-tc4", "has-tc5", "has-tc6", "has-tc7", "has-tcc0", "has-tcc1", "has-tcc2", "has-tcc3", "has-usb", "periph-d11c", "periph-d11d", "periph-d21", "periph-d21e", "periph-d21g", "periph-d21j", "periph-d21el", "periph-d21gl", "periph-d51", "periph-d51g", "periph-d51j", "periph-d51n", "periph-d51p", "periph-e51g", "periph-e51j", "periph-e51n", "periph-e53j", "periph-e53n", "periph-e54n", "periph-e54p"] }
===============================================================================
Features
===============================================================================
- samd11c samd11c-rt? = atsamd11c, periph-d11c, pins-d11c, samd11
-
-------------------------------------------------------------------------------
Variant features
-------------------------------------------------------------------------------
Each of the following features corresponds to a supported chip variant. Users should select one (and only one) feature corresponding to their target chip.
These features represent the public interface of the HAL and are not expected to change. But all implied features are considered implementation details and subject to change without notice. - samd11d samd11d-rt? = atsamd11d, periph-d11d, pins-d11d, samd11
- samd21e samd21e-rt? = atsamd21e, periph-d21e, pins-d21e, samd21
- samd21g samd21g-rt? = atsamd21g, periph-d21g, pins-d21g, samd21
- samd21j samd21j-rt? = atsamd21j, periph-d21j, pins-d21j, samd21
- samd21el samd21el-rt? = atsamd21e, periph-d21el, pins-d21el, samd21
- samd21gl samd21gl-rt? = atsamd21g, periph-d21gl, pins-d21gl, samd21
- samd51g samd51g-rt? = atsamd51g, periph-d51g, pins-d51g, samd51
- samd51j samd51j-rt? = atsamd51j, periph-d51j, pins-d51j, samd51
- samd51n samd51n-rt? = atsamd51n, periph-d51n, pins-d51n, samd51
- samd51p samd51p-rt? = atsamd51p, periph-d51p, pins-d51p, samd51
- same51g same51g-rt? = atsame51g, periph-e51g, pins-e51g, same51
- same51j same51j-rt? = atsame51j, periph-e51j, pins-e51j, same51
- same51n same51n-rt? = atsame51n, periph-e51n, pins-e51n, same51
- same53j same53j-rt? = atsame53j, periph-e53j, pins-e53j, same53
- same53n same53n-rt? = atsame53n, periph-e53n, pins-e53n, same53
- same54n same54n-rt? = atsame54n, periph-e54n, pins-e54n, same54
- same54p same54p-rt? = atsame54p, periph-e54p, pins-e54p, same54
- samd11c-rt = samd11c
-
RT features
Instead of selecting a variant feature above, users can optionally select an
-rt
feature, which enables thert
feature of the corresponding PAC.===============================================================================
PACs
===============================================================================
The peripheral access crates (PAC) for each supported chip variant are listed here. Each is an optional dependency, which means each PAC name also appears as a Cargo feature. Users should not select PAC features manually. Instead,
users should specify a corresponding variant (see below). The variant features will select the correct PAC, as well as other configuration features. - samd11d-rt = samd11d
- samd21e-rt = samd21e
- samd21g-rt = samd21g
- samd21j-rt = samd21j
- samd21el-rt = samd21el
- samd21gl-rt = samd21gl
- samd51g-rt = samd51g
- samd51j-rt = samd51j
- samd51n-rt = samd51n
- samd51p-rt = samd51p
- same51g-rt = same51g
- same51j-rt = same51j
- same51n-rt = same51n
- same53j-rt = same53j
- same53n-rt = same53n
- same54n-rt = same54n
- same54p-rt = same54p
- default = unproven
-
User-selectable features
These features are user-selectable and enable additional features within the HAL, like USB or DMA support.
Many essential traits within embedded-hal are locked behind the
unproven
feature. This is unfortunate, but it should be resolved with embedded-hal 1.0. Until then, we makeunproven
a default feature. - can = mcan-core
-
Affects
thumbv7em::can
… - dma max-channels? = unproven
-
Affects
atsamd-hal::dmac
,sercom::dma
… - enable_unsafe_aes_newblock_cipher
-
Affects
aes::AesRustCrypto
… - max-channels = dma
- rtic = rtic-monotonic
-
Affects
rtc::Instant
,rtc::Duration
… - sdmmc = embedded-sdmmc
- unproven default dma?
-
Enables unproven of embedded-hal ^0.2
Affects
thumbv6m::adc
,thumbv6m::pwm
,thumbv6m::watchdog
,thumbv7em::adc
,thumbv7em::pwm
,thumbv7em::watchdog
,thumbv7em::icm
… - usb = usb-device
-
Affects
thumbv7em::usb
,thumbv6m::usb
… - use_rtt = jlink_rtt
- defmt
-
Enables defmt
- device thumbv6? thumbv7?
-
=============================================================================== Implementation-details
The remaining features are considered implementation details and subject to change without notice. Users should not specify any of these features manually.
Chip
The
device
feature tells the HAL that a device has been selected from the feature list. It exists mostly to provide better error messages.Affects
atsamd-hal::delay
,atsamd-hal::gpio
,atsamd-hal::prelude
,atsamd-hal::rtc
,atsamd-hal::sercom
… - library
-
The
library
feature exists to allow building the HAL without specifying a device. It should be mutually exclusive with thedevice
feature. - thumbv6 samd11? samd21? = device
-
Define a feature for each instruction set
Affects
atsamd-hal::thumbv6m
,spi::impl_ehal
,spi::DataWidth
,spi::Size
,spi::DefaultSize
,config::Clock
,uart::DataReg
… - thumbv7 samd51? same51? same53? same54? = device
-
Affects
atsamd-hal::thumbv7em
,spi::lengths
,spi::impl_ehal
,spi::DataWidth
,spi::Size
,spi::DefaultSize
,config::Clock
,uart::DataReg
… - samd11 samd11c? samd11d? = thumbv6
-
Map each series of chips to its instruction set
Affects
pads_thumbv6m::PadsFromIds
,pad::GetPad
,pad::PadMode
,pad::Pad
… - samd21 samd21e? samd21el? samd21g? samd21gl? samd21j? = thumbv6
-
Affects
pads_thumbv6m::PadsFromIds
,pads_thumbv6m::PadsFromIds
,pads_thumbv6m::PadsFromIds
… - samd51 samd51g? samd51j? samd51n? samd51p? = thumbv7
- same51 same51g? same51j? same51n? = thumbv7
- same53 same53j? same53n? = thumbv7
- same54 same54n? same54p? = thumbv7
- has-pa00 pins-32a? pins-48a?
-
-------------------------------------------------------------------------------
Pins
-------------------------------------------------------------------------------
Define features for specific pins
Cargo features are purely additive. This mostly works well for GPIO pins,
because the pins in a larger package are typically a strict super set of the pins in a smaller package. However, there are a few exceptions to this rule.
For these pins, we create dedicated features. - has-pa01 pins-32a? pins-48a?
- has-pa27 pins-32a? pins-48? pins-d11d?
- has-pa28 pins-d11c? pins-d11d? pins-d21e? pins-d21el? pins-d21g? pins-d21gl? pins-d21j?
- has-pb00 has-pb01 pins-48l?
- has-pb02 has-pb03 pins-32l? pins-48?
- has-pb04 has-pb05 pins-32l? pins-48l?
- has-pb22 has-pb23 pins-48a?
- pins-14 pins-24? pins-d11c?
-
Define features for various sets of pins, each corresponding to a particular device package
- pins-24 pins-32? pins-d11d? = pins-14
- pins-32 pins-32a? pins-32l? pins-48? = pins-24
- pins-32a pins-d21e? = has-pa00, has-pa01, has-pa27, pins-32
- pins-32l pins-d21el? = has-pb02, has-pb03, has-pb04, has-pb05, pins-32
- pins-48 pins-48a? pins-48l? = has-pa27, has-pb02, has-pb03, pins-32
- pins-48a pins-64? pins-d21g? pins-d51g? pins-e51g? = has-pa00, has-pa01, has-pb22, has-pb23, pins-48
- pins-48l pins-64? pins-d21gl? = has-pb00, has-pb01, has-pb04, has-pb05, pins-48
- pins-64 pins-100? pins-d21j? pins-d51j? pins-e51j? pins-e53j? = pins-48a, pins-48l
- pins-100 pins-128? pins-d51n? pins-e51n? pins-e53n? pins-e54n? = pins-64
- pins-128 pins-d51p? pins-e54p? = pins-100
- pins-d11c samd11c? = has-pa28, pins-14
-
Map each variant to its corresponding set of pins
- pins-d11d samd11d? = has-pa27, has-pa28, pins-24
- pins-d21e samd21e? = has-pa28, pins-32a
- pins-d21g samd21g? = has-pa28, pins-48a
- pins-d21j samd21j? = has-pa28, pins-64
- pins-d21el samd21el? = has-pa28, pins-32l
- pins-d21gl samd21gl? = has-pa28, pins-48l
- pins-d51g samd51g? = pins-48a
- pins-d51j samd51j? = pins-64
- pins-d51n samd51n? = pins-100
- pins-d51p samd51p? = pins-128
- pins-e51g same51g? = pins-48a
- pins-e51j same51j? = pins-64
- pins-e51n same51n? = pins-100
- pins-e53j same53j? = pins-64
- pins-e53n same53n? = pins-100
- pins-e54n same54n? = pins-100
- pins-e54p same54p? = pins-128
- has-can0 periph-e51g? periph-e51j? periph-e51n? periph-e54n? periph-e54p?
-
-------------------------------------------------------------------------------
Peripherals
-------------------------------------------------------------------------------
Define a feature for each optional peripheralAffects
thumbv7em::can
… - has-can1 periph-e51j? periph-e51n? periph-e54n? periph-e54p?
-
Affects
thumbv7em::can
… - has-ethernet periph-e53j? periph-e53n? periph-e54n? periph-e54p?
- has-gmac
-
Affects
apb::ApbClks.gmac
… - has-i2s periph-d21? periph-d51j?
-
Affects
apb::ApbTokens.i2s
… - has-sdhc1 periph-d51n?
- has-sercom0 has-sercom1 periph-d11c? periph-d21? periph-d51?
- has-sercom2 periph-d11d? periph-d21? periph-d51?
- has-sercom3 periph-d21? periph-d51?
- has-sercom4 has-sercom5 periph-d21g? periph-d21gl? periph-d51?
- has-sercom6 periph-d51n? periph-e51n?
-
Affects
apb::ApbTokens.sercom6
… - has-sercom7 periph-d51n? periph-e51n?
-
Affects
apb::ApbTokens.sercom7
… - has-tc0 periph-d51?
- has-tc1 has-tc2 periph-d11c? periph-d51?
- has-tc3 periph-d21? periph-d51?
- has-tc4 periph-d21? periph-d51j?
-
Affects
apb::ApbTokens.tc4
… - has-tc5 periph-d21? periph-d51j?
-
Affects
apb::ApbTokens.tc5
… - has-tc6 periph-d21j? periph-d51n? periph-e51n?
-
Affects
apb::ApbTokens.tc6
… - has-tc7 periph-d21j? periph-d51n? periph-e51n?
-
Affects
apb::ApbTokens.tc7
… - has-tcc0 periph-d11c? periph-d21? periph-d51?
- has-tcc1 periph-d21? periph-d51?
- has-tcc2 periph-d21? periph-d51j?
- has-tcc3 periph-d51j?
-
Affects
apb::ApbTokens.tcc3
… - has-usb periph-d21e? periph-d51?
-
Affects
thumbv6m::usb
… - periph-d11c periph-d11d? samd11c? = has-sercom0, has-sercom1, has-tc1, has-tc2, has-tcc0
-
Map each variant to its collection of peripherals
- periph-d11d samd11d? = has-sercom2, periph-d11c
- periph-d21 periph-d21e? periph-d21el? = has-i2s, has-sercom0, has-sercom1, has-sercom2, has-sercom3, has-tc3, has-tc4, has-tc5, has-tcc0, has-tcc1, has-tcc2
- periph-d21e periph-d21g? samd21e? = has-usb, periph-d21
- periph-d21g periph-d21j? samd21g? = has-sercom4, has-sercom5, periph-d21e
- periph-d21j samd21j? = has-tc6, has-tc7, periph-d21g
- periph-d21el periph-d21gl? samd21el? = periph-d21
- periph-d21gl samd21gl? = has-sercom4, has-sercom5, periph-d21el
- periph-d51 periph-d51g? = has-sercom0, has-sercom1, has-sercom2, has-sercom3, has-sercom4, has-sercom5, has-tc0, has-tc1, has-tc2, has-tc3, has-tcc0, has-tcc1, has-usb
- periph-d51g periph-d51j? periph-e51g? samd51g? = periph-d51
- periph-d51j periph-d51n? periph-e51j? periph-e51n? periph-e53j? samd51j? = has-i2s, has-tc4, has-tc5, has-tcc2, has-tcc3, periph-d51g
- periph-d51n periph-d51p? periph-e53n? periph-e54n? samd51n? = has-sdhc1, has-sercom6, has-sercom7, has-tc6, has-tc7, periph-d51j
- periph-d51p periph-e54p? samd51p? = periph-d51n
- periph-e51g same51g? = has-can0, periph-d51g
- periph-e51j same51j? = has-can0, has-can1, periph-d51j
- periph-e51n same51n? = has-can0, has-can1, has-sercom6, has-sercom7, has-tc6, has-tc7, periph-d51j
- periph-e53j same53j? = has-ethernet, periph-d51j
- periph-e53n same53n? = has-ethernet, periph-d51n
- periph-e54n same54n? = has-can0, has-can1, has-ethernet, periph-d51n
- periph-e54p same54p? = has-can0, has-can1, has-ethernet, periph-d51p
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.
===============================================================================
Required depdendencies
===============================================================================
- embedded-sdmmc sdmmc?
-
Enables embedded-sdmmc ^0.3
===============================================================================
Optional depdendencies
=============================================================================== - jlink_rtt use_rtt?
- mcan-core can?
- rtic-monotonic rtic?
- usb-device usb?
-
Enables usb-device ^0.2
- atsamd11c samd11c? samd11c-rt?
- atsamd11d samd11d? samd11d-rt?
- atsamd21e samd21e? samd21e-rt? samd21el? samd21el-rt?
- atsamd21g samd21g? samd21g-rt? samd21gl? samd21gl-rt?
- atsamd21j samd21j? samd21j-rt?
- atsamd51g samd51g? samd51g-rt?
- atsamd51j samd51j? samd51j-rt?
- atsamd51n samd51n? samd51n-rt?
- atsamd51p samd51p? samd51p-rt?
- atsame51g same51g? same51g-rt?
- atsame51j same51j? same51j-rt?
- atsame51n same51n? same51n-rt?
- atsame53j same53j? same53j-rt?
- atsame53n same53n? same53n-rt?
- atsame54n same54n? same54n-rt?
- atsame54p same54p? same54p-rt?