From 0666a6ba1dbd66cf8b93c113e362ccbcd99152a0 Mon Sep 17 00:00:00 2001 From: Arne Dußin Date: Sat, 6 Nov 2021 11:50:33 +0100 Subject: Initial commit --- src/sdadc.rs | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 src/sdadc.rs (limited to 'src/sdadc.rs') diff --git a/src/sdadc.rs b/src/sdadc.rs new file mode 100644 index 0000000..11e926a --- /dev/null +++ b/src/sdadc.rs @@ -0,0 +1,140 @@ +#[doc = r"Register block"] +#[repr(C)] +pub struct RegisterBlock { + #[doc = "0x00 - Control A"] + pub ctrla: crate::Reg, + #[doc = "0x01 - Reference Control"] + pub refctrl: crate::Reg, + #[doc = "0x02 - Control B"] + pub ctrlb: crate::Reg, + #[doc = "0x04 - Event Control"] + pub evctrl: crate::Reg, + #[doc = "0x05 - Interrupt Enable Clear"] + pub intenclr: crate::Reg, + #[doc = "0x06 - Interrupt Enable Set"] + pub intenset: crate::Reg, + #[doc = "0x07 - Interrupt Flag Status and Clear"] + pub intflag: crate::Reg, + #[doc = "0x08 - Sequence Status"] + pub seqstatus: crate::Reg, + #[doc = "0x09 - Input Control"] + pub inputctrl: crate::Reg, + #[doc = "0x0a - Control C"] + pub ctrlc: crate::Reg, + #[doc = "0x0b - Window Monitor Control"] + pub winctrl: crate::Reg, + #[doc = "0x0c - Window Monitor Lower Threshold"] + pub winlt: crate::Reg, + #[doc = "0x10 - Window Monitor Upper Threshold"] + pub winut: crate::Reg, + #[doc = "0x14 - Offset Correction"] + pub offsetcorr: crate::Reg, + #[doc = "0x18 - Gain Correction"] + pub gaincorr: crate::Reg, + #[doc = "0x1a - Shift Correction"] + pub shiftcorr: crate::Reg, + _reserved16: [u8; 0x01], + #[doc = "0x1c - Software Trigger"] + pub swtrig: crate::Reg, + _reserved17: [u8; 0x03], + #[doc = "0x20 - Synchronization Busy"] + pub syncbusy: crate::Reg, + #[doc = "0x24 - Result"] + pub result: crate::Reg, + #[doc = "0x28 - Sequence Control"] + pub seqctrl: crate::Reg, + _reserved20: [u8; 0x03], + #[doc = "0x2c - Analog Control"] + pub anactrl: crate::Reg, + _reserved21: [u8; 0x01], + #[doc = "0x2e - Debug Control"] + pub dbgctrl: crate::Reg, +} +#[doc = "CTRLA register accessor: an alias for `Reg`"] +pub type CTRLA = crate::Reg; +#[doc = "Control A"] +pub mod ctrla; +#[doc = "REFCTRL register accessor: an alias for `Reg`"] +pub type REFCTRL = crate::Reg; +#[doc = "Reference Control"] +pub mod refctrl; +#[doc = "CTRLB register accessor: an alias for `Reg`"] +pub type CTRLB = crate::Reg; +#[doc = "Control B"] +pub mod ctrlb; +#[doc = "EVCTRL register accessor: an alias for `Reg`"] +pub type EVCTRL = crate::Reg; +#[doc = "Event Control"] +pub mod evctrl; +#[doc = "INTENCLR register accessor: an alias for `Reg`"] +pub type INTENCLR = crate::Reg; +#[doc = "Interrupt Enable Clear"] +pub mod intenclr; +#[doc = "INTENSET register accessor: an alias for `Reg`"] +pub type INTENSET = crate::Reg; +#[doc = "Interrupt Enable Set"] +pub mod intenset; +#[doc = "INTFLAG register accessor: an alias for `Reg`"] +pub type INTFLAG = crate::Reg; +#[doc = "Interrupt Flag Status and Clear"] +pub mod intflag; +#[doc = "SEQSTATUS register accessor: an alias for `Reg`"] +pub type SEQSTATUS = crate::Reg; +#[doc = "Sequence Status"] +pub mod seqstatus; +#[doc = "INPUTCTRL register accessor: an alias for `Reg`"] +pub type INPUTCTRL = crate::Reg; +#[doc = "Input Control"] +pub mod inputctrl; +#[doc = "CTRLC register accessor: an alias for `Reg`"] +pub type CTRLC = crate::Reg; +#[doc = "Control C"] +pub mod ctrlc; +#[doc = "WINCTRL register accessor: an alias for `Reg`"] +pub type WINCTRL = crate::Reg; +#[doc = "Window Monitor Control"] +pub mod winctrl; +#[doc = "WINLT register accessor: an alias for `Reg`"] +pub type WINLT = crate::Reg; +#[doc = "Window Monitor Lower Threshold"] +pub mod winlt; +#[doc = "WINUT register accessor: an alias for `Reg`"] +pub type WINUT = crate::Reg; +#[doc = "Window Monitor Upper Threshold"] +pub mod winut; +#[doc = "OFFSETCORR register accessor: an alias for `Reg`"] +pub type OFFSETCORR = crate::Reg; +#[doc = "Offset Correction"] +pub mod offsetcorr; +#[doc = "GAINCORR register accessor: an alias for `Reg`"] +pub type GAINCORR = crate::Reg; +#[doc = "Gain Correction"] +pub mod gaincorr; +#[doc = "SHIFTCORR register accessor: an alias for `Reg`"] +pub type SHIFTCORR = crate::Reg; +#[doc = "Shift Correction"] +pub mod shiftcorr; +#[doc = "SWTRIG register accessor: an alias for `Reg`"] +pub type SWTRIG = crate::Reg; +#[doc = "Software Trigger"] +pub mod swtrig; +#[doc = "SYNCBUSY register accessor: an alias for `Reg`"] +pub type SYNCBUSY = crate::Reg; +#[doc = "Synchronization Busy"] +pub mod syncbusy; +#[doc = "RESULT register accessor: an alias for `Reg`"] +pub type RESULT = crate::Reg; +#[doc = "Result"] +pub mod result; +#[doc = "SEQCTRL register accessor: an alias for `Reg`"] +pub type SEQCTRL = crate::Reg; +#[doc = "Sequence Control"] +pub mod seqctrl; +#[doc = "ANACTRL register accessor: an alias for `Reg`"] +pub type ANACTRL = crate::Reg; +#[doc = "Analog Control"] +pub mod anactrl; +#[doc = "DBGCTRL register accessor: an alias for `Reg`"] +pub type DBGCTRL = crate::Reg; +#[doc = "Debug Control"] +pub mod dbgctrl; -- cgit v1.2.3-70-g09d2