atsamd_hal::clock::v2::gclk

Trait GclkId

Source
pub trait GclkId: Sealed {
    type Divider: GclkDivider;

    const DYN: DynGclkId;
    const NUM: usize;
}
Expand description

Type-level enum identifying one of 12 possible Gclks

The types implementing this trait, i.e. Gclk0Id - Gclk11Id, are type-level variants of GclkId, and they identify one of the 12 possible generic clock generators.

GclkId is the type-level equivalent of DynGclkId. See the documentation on type-level programming and specifically type-level enums for more details.

Required Associated Constants§

Source

const DYN: DynGclkId

Corresponding variant of DynGclkId

Source

const NUM: usize

Corresponding numeric index (0..12)

Required Associated Types§

Source

type Divider: GclkDivider

Corresponding GclkDivider type

Gclk1 uses GclkDiv16, while all other Gclks use GclkDiv8.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl GclkId for Gclk0Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk0

Source§

const NUM: usize = 0usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk1Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk1

Source§

const NUM: usize = 1usize

Source§

type Divider = GclkDiv16

Source§

impl GclkId for Gclk2Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk2

Source§

const NUM: usize = 2usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk3Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk3

Source§

const NUM: usize = 3usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk4Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk4

Source§

const NUM: usize = 4usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk5Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk5

Source§

const NUM: usize = 5usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk6Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk6

Source§

const NUM: usize = 6usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk7Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk7

Source§

const NUM: usize = 7usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk8Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk8

Source§

const NUM: usize = 8usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk9Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk9

Source§

const NUM: usize = 9usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk10Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk10

Source§

const NUM: usize = 10usize

Source§

type Divider = GclkDiv8

Source§

impl GclkId for Gclk11Id

Source§

const DYN: DynGclkId = DynGclkId::Gclk11

Source§

const NUM: usize = 11usize

Source§

type Divider = GclkDiv8