esp8266 0.0.2

A minimal peripheral access crate the ESP8266
Documentation
#[doc = "Reader of register GPIO_ENABLE"]
pub type R = crate::R<u32, super::GPIO_ENABLE>;
#[doc = "Writer for register GPIO_ENABLE"]
pub type W = crate::W<u32, super::GPIO_ENABLE>;
#[doc = "Register GPIO_ENABLE `reset()`'s with value 0"]
impl crate::ResetValue for super::GPIO_ENABLE {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Reader of field `GPIO_SDIO_SEL`"]
pub type GPIO_SDIO_SEL_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `GPIO_SDIO_SEL`"]
pub struct GPIO_SDIO_SEL_W<'a> {
    w: &'a mut W,
}
impl<'a> GPIO_SDIO_SEL_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x3f << 16)) | (((value as u32) & 0x3f) << 16);
        self.w
    }
}
#[doc = "Reader of field `GPIO_ENABLE_DATA`"]
pub type GPIO_ENABLE_DATA_R = crate::R<u16, u16>;
#[doc = "Write proxy for field `GPIO_ENABLE_DATA`"]
pub struct GPIO_ENABLE_DATA_W<'a> {
    w: &'a mut W,
}
impl<'a> GPIO_ENABLE_DATA_W<'a> {
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u16) -> &'a mut W {
        self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff);
        self.w
    }
}
impl R {
    #[doc = "Bits 16:21"]
    #[inline(always)]
    pub fn gpio_sdio_sel(&self) -> GPIO_SDIO_SEL_R {
        GPIO_SDIO_SEL_R::new(((self.bits >> 16) & 0x3f) as u8)
    }
    #[doc = "Bits 0:15"]
    #[inline(always)]
    pub fn gpio_enable_data(&self) -> GPIO_ENABLE_DATA_R {
        GPIO_ENABLE_DATA_R::new((self.bits & 0xffff) as u16)
    }
}
impl W {
    #[doc = "Bits 16:21"]
    #[inline(always)]
    pub fn gpio_sdio_sel(&mut self) -> GPIO_SDIO_SEL_W {
        GPIO_SDIO_SEL_W { w: self }
    }
    #[doc = "Bits 0:15"]
    #[inline(always)]
    pub fn gpio_enable_data(&mut self) -> GPIO_ENABLE_DATA_W {
        GPIO_ENABLE_DATA_W { w: self }
    }
}