Struct nrf52820_pac::comp::RegisterBlock
source · [−]#[repr(C)]pub struct RegisterBlock {Show 19 fields
pub tasks_start: Reg<TASKS_START_SPEC>,
pub tasks_stop: Reg<TASKS_STOP_SPEC>,
pub tasks_sample: Reg<TASKS_SAMPLE_SPEC>,
pub events_ready: Reg<EVENTS_READY_SPEC>,
pub events_down: Reg<EVENTS_DOWN_SPEC>,
pub events_up: Reg<EVENTS_UP_SPEC>,
pub events_cross: Reg<EVENTS_CROSS_SPEC>,
pub shorts: Reg<SHORTS_SPEC>,
pub inten: Reg<INTEN_SPEC>,
pub intenset: Reg<INTENSET_SPEC>,
pub intenclr: Reg<INTENCLR_SPEC>,
pub result: Reg<RESULT_SPEC>,
pub enable: Reg<ENABLE_SPEC>,
pub psel: Reg<PSEL_SPEC>,
pub refsel: Reg<REFSEL_SPEC>,
pub extrefsel: Reg<EXTREFSEL_SPEC>,
pub th: Reg<TH_SPEC>,
pub mode: Reg<MODE_SPEC>,
pub hyst: Reg<HYST_SPEC>,
/* private fields */
}
Expand description
Register block
Fields
tasks_start: Reg<TASKS_START_SPEC>
0x00 - Start comparator
tasks_stop: Reg<TASKS_STOP_SPEC>
0x04 - Stop comparator
tasks_sample: Reg<TASKS_SAMPLE_SPEC>
0x08 - Sample comparator value
events_ready: Reg<EVENTS_READY_SPEC>
0x100 - COMP is ready and output is valid
events_down: Reg<EVENTS_DOWN_SPEC>
0x104 - Downward crossing
events_up: Reg<EVENTS_UP_SPEC>
0x108 - Upward crossing
events_cross: Reg<EVENTS_CROSS_SPEC>
0x10c - Downward or upward crossing
shorts: Reg<SHORTS_SPEC>
0x200 - Shortcuts between local events and tasks
inten: Reg<INTEN_SPEC>
0x300 - Enable or disable interrupt
intenset: Reg<INTENSET_SPEC>
0x304 - Enable interrupt
intenclr: Reg<INTENCLR_SPEC>
0x308 - Disable interrupt
result: Reg<RESULT_SPEC>
0x400 - Compare result
enable: Reg<ENABLE_SPEC>
0x500 - COMP enable
psel: Reg<PSEL_SPEC>
0x504 - Pin select
refsel: Reg<REFSEL_SPEC>
0x508 - Reference source select for single-ended mode
extrefsel: Reg<EXTREFSEL_SPEC>
0x50c - External reference select
th: Reg<TH_SPEC>
0x530 - Threshold configuration for hysteresis unit
mode: Reg<MODE_SPEC>
0x534 - Mode configuration
hyst: Reg<HYST_SPEC>
0x538 - Comparator hysteresis enable
Auto Trait Implementations
impl !RefUnwindSafe for RegisterBlock
impl Send for RegisterBlock
impl !Sync for RegisterBlock
impl Unpin for RegisterBlock
impl UnwindSafe for RegisterBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more