rp235x_pac/inner/sio/
gpio_hi_in.rs1#[doc = "Register `GPIO_HI_IN` reader"]
2pub type R = crate::R<GPIO_HI_IN_SPEC>;
3#[doc = "Register `GPIO_HI_IN` writer"]
4pub type W = crate::W<GPIO_HI_IN_SPEC>;
5#[doc = "Field `GPIO` reader - Input value on GPIO32...47"]
6pub type GPIO_R = crate::FieldReader<u16>;
7#[doc = "Field `USB_DP` reader - Input value on USB D+ pin"]
8pub type USB_DP_R = crate::BitReader;
9#[doc = "Field `USB_DM` reader - Input value on USB D- pin"]
10pub type USB_DM_R = crate::BitReader;
11#[doc = "Field `QSPI_SCK` reader - Input value on QSPI SCK pin"]
12pub type QSPI_SCK_R = crate::BitReader;
13#[doc = "Field `QSPI_CSN` reader - Input value on QSPI CSn pin"]
14pub type QSPI_CSN_R = crate::BitReader;
15#[doc = "Field `QSPI_SD` reader - Input value on QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins"]
16pub type QSPI_SD_R = crate::FieldReader;
17impl R {
18 #[doc = "Bits 0:15 - Input value on GPIO32...47"]
19 #[inline(always)]
20 pub fn gpio(&self) -> GPIO_R {
21 GPIO_R::new((self.bits & 0xffff) as u16)
22 }
23 #[doc = "Bit 24 - Input value on USB D+ pin"]
24 #[inline(always)]
25 pub fn usb_dp(&self) -> USB_DP_R {
26 USB_DP_R::new(((self.bits >> 24) & 1) != 0)
27 }
28 #[doc = "Bit 25 - Input value on USB D- pin"]
29 #[inline(always)]
30 pub fn usb_dm(&self) -> USB_DM_R {
31 USB_DM_R::new(((self.bits >> 25) & 1) != 0)
32 }
33 #[doc = "Bit 26 - Input value on QSPI SCK pin"]
34 #[inline(always)]
35 pub fn qspi_sck(&self) -> QSPI_SCK_R {
36 QSPI_SCK_R::new(((self.bits >> 26) & 1) != 0)
37 }
38 #[doc = "Bit 27 - Input value on QSPI CSn pin"]
39 #[inline(always)]
40 pub fn qspi_csn(&self) -> QSPI_CSN_R {
41 QSPI_CSN_R::new(((self.bits >> 27) & 1) != 0)
42 }
43 #[doc = "Bits 28:31 - Input value on QSPI SD0 (MOSI), SD1 (MISO), SD2 and SD3 pins"]
44 #[inline(always)]
45 pub fn qspi_sd(&self) -> QSPI_SD_R {
46 QSPI_SD_R::new(((self.bits >> 28) & 0x0f) as u8)
47 }
48}
49impl W {}
50#[doc = "Input value on GPIO32...47, QSPI IOs and USB pins In the Non-secure SIO, Secure-only GPIOs (as per ACCESSCTRL) appear as zero.
51
52You can [`read`](crate::Reg::read) this register and get [`gpio_hi_in::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gpio_hi_in::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
53pub struct GPIO_HI_IN_SPEC;
54impl crate::RegisterSpec for GPIO_HI_IN_SPEC {
55 type Ux = u32;
56}
57#[doc = "`read()` method returns [`gpio_hi_in::R`](R) reader structure"]
58impl crate::Readable for GPIO_HI_IN_SPEC {}
59#[doc = "`write(|w| ..)` method takes [`gpio_hi_in::W`](W) writer structure"]
60impl crate::Writable for GPIO_HI_IN_SPEC {
61 type Safety = crate::Unsafe;
62 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
63 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
64}
65#[doc = "`reset()` method sets GPIO_HI_IN to value 0"]
66impl crate::Resettable for GPIO_HI_IN_SPEC {
67 const RESET_VALUE: u32 = 0;
68}