lpc845_pac/syscon/
device_id.rs1#[doc = "Register `DEVICE_ID` reader"]
2pub struct R(crate::R<DEVICE_ID_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<DEVICE_ID_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<DEVICE_ID_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<DEVICE_ID_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `DEVICEID` reader - Part ID"]
17pub struct DEVICEID_R(crate::FieldReader<u32, u32>);
18impl DEVICEID_R {
19 pub(crate) fn new(bits: u32) -> Self {
20 DEVICEID_R(crate::FieldReader::new(bits))
21 }
22}
23impl core::ops::Deref for DEVICEID_R {
24 type Target = crate::FieldReader<u32, u32>;
25 #[inline(always)]
26 fn deref(&self) -> &Self::Target {
27 &self.0
28 }
29}
30impl R {
31 #[doc = "Bits 0:31 - Part ID"]
32 #[inline(always)]
33 pub fn deviceid(&self) -> DEVICEID_R {
34 DEVICEID_R::new((self.bits & 0xffff_ffff) as u32)
35 }
36}
37#[doc = "Part ID register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [device_id](index.html) module"]
38pub struct DEVICE_ID_SPEC;
39impl crate::RegisterSpec for DEVICE_ID_SPEC {
40 type Ux = u32;
41}
42#[doc = "`read()` method returns [device_id::R](R) reader structure"]
43impl crate::Readable for DEVICE_ID_SPEC {
44 type Reader = R;
45}
46#[doc = "`reset()` method sets DEVICE_ID to value 0"]
47impl crate::Resettable for DEVICE_ID_SPEC {
48 #[inline(always)]
49 fn reset_value() -> Self::Ux {
50 0
51 }
52}