mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-12 05:21:31 +11:00
31 lines
738 B
Rust
31 lines
738 B
Rust
|
//! Semi-internal enums mostly used in typelevel magic
|
||
|
|
||
|
/// Value-level `struct` representing slice IDs
|
||
|
#[derive(PartialEq, Clone, Copy)]
|
||
|
pub struct DynSliceId {
|
||
|
/// Slice id
|
||
|
pub num: u8,
|
||
|
}
|
||
|
|
||
|
/// Slice modes
|
||
|
#[derive(PartialEq, Clone, Copy)]
|
||
|
pub enum DynSliceMode {
|
||
|
/// Count continuously whenever the slice is enabled
|
||
|
FreeRunning,
|
||
|
/// Count continuously when a high level is detected on the B pin
|
||
|
InputHighRunning,
|
||
|
/// Count once with each rising edge detected on the B pin
|
||
|
CountRisingEdge,
|
||
|
/// Count once with each falling edge detected on the B pin
|
||
|
CountFallingEdge,
|
||
|
}
|
||
|
|
||
|
/// Channel ids
|
||
|
#[derive(PartialEq, Clone, Copy)]
|
||
|
pub enum DynChannelId {
|
||
|
/// Channel A
|
||
|
A,
|
||
|
/// Channel B
|
||
|
B,
|
||
|
}
|