pub struct Pac { /* private fields */ }
Expand description

Collection of low-level PAC structs

This struct serves to guard access to the low-level PAC structs. It places them behind an unsafe barrier.

Normally, users trade the low-level PAC structs for the higher-level clock::v2 API. However, in some cases, the clock::v2 API may not be sufficient. In these cases, users can access the registers directly by calling Pac::steal to recover the PAC structs.

Implementations

Escape hatch allowing to access low-level PAC structs

Consume the Pac and return the low-level PAC structs. This is useful when the clock::v2 API does not provide a necessary feature, or when dealing with the legacy clock::v1 API. For example, many of the clock::v1 functions require access to the MCLK peripheral.

Safety

Directly configuring clocks through the PAC API can invalidate the type-level guarantees of the clock module API.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.