1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "0x00 - USART Baud Rate Register Low Byte"]
    pub ubrrl: UBRRL,
    #[doc = "0x01 - USART Control and Status Register B"]
    pub ucsrb: UCSRB,
    #[doc = "0x02 - USART Control and Status Register A"]
    pub ucsra: UCSRA,
    #[doc = "0x03 - USART I/O Data Register"]
    pub udr: UDR,
    _reserved4: [u8; 19usize],
    _reserved_4_ubrrh: [u8; 1usize],
}
impl RegisterBlock {
    #[doc = "0x17 - USART Control and Status Register C"]
    #[inline(always)]
    pub fn ucsrc(&self) -> &UCSRC {
        unsafe { &*(((self as *const Self) as *const u8).add(23usize) as *const UCSRC) }
    }
    #[doc = "0x17 - USART Control and Status Register C"]
    #[inline(always)]
    pub fn ucsrc_mut(&self) -> &mut UCSRC {
        unsafe { &mut *(((self as *const Self) as *mut u8).add(23usize) as *mut UCSRC) }
    }
    #[doc = "0x17 - USART Baud Rate Register Hight Byte"]
    #[inline(always)]
    pub fn ubrrh(&self) -> &UBRRH {
        unsafe { &*(((self as *const Self) as *const u8).add(23usize) as *const UBRRH) }
    }
    #[doc = "0x17 - USART Baud Rate Register Hight Byte"]
    #[inline(always)]
    pub fn ubrrh_mut(&self) -> &mut UBRRH {
        unsafe { &mut *(((self as *const Self) as *mut u8).add(23usize) as *mut UBRRH) }
    }
}
#[doc = "USART Baud Rate Register Hight Byte\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ubrrh](ubrrh) module"]
pub type UBRRH = crate::Reg<u8, _UBRRH>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UBRRH;
#[doc = "`read()` method returns [ubrrh::R](ubrrh::R) reader structure"]
impl crate::Readable for UBRRH {}
#[doc = "`write(|w| ..)` method takes [ubrrh::W](ubrrh::W) writer structure"]
impl crate::Writable for UBRRH {}
#[doc = "USART Baud Rate Register Hight Byte"]
pub mod ubrrh;
#[doc = "USART Baud Rate Register Low Byte\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ubrrl](ubrrl) module"]
pub type UBRRL = crate::Reg<u8, _UBRRL>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UBRRL;
#[doc = "`read()` method returns [ubrrl::R](ubrrl::R) reader structure"]
impl crate::Readable for UBRRL {}
#[doc = "`write(|w| ..)` method takes [ubrrl::W](ubrrl::W) writer structure"]
impl crate::Writable for UBRRL {}
#[doc = "USART Baud Rate Register Low Byte"]
pub mod ubrrl;
#[doc = "USART Control and Status Register A\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 [ucsra](ucsra) module"]
pub type UCSRA = crate::Reg<u8, _UCSRA>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UCSRA;
#[doc = "`read()` method returns [ucsra::R](ucsra::R) reader structure"]
impl crate::Readable for UCSRA {}
#[doc = "USART Control and Status Register A"]
pub mod ucsra;
#[doc = "USART Control and Status Register B\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ucsrb](ucsrb) module"]
pub type UCSRB = crate::Reg<u8, _UCSRB>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UCSRB;
#[doc = "`read()` method returns [ucsrb::R](ucsrb::R) reader structure"]
impl crate::Readable for UCSRB {}
#[doc = "`write(|w| ..)` method takes [ucsrb::W](ucsrb::W) writer structure"]
impl crate::Writable for UCSRB {}
#[doc = "USART Control and Status Register B"]
pub mod ucsrb;
#[doc = "USART Control and Status Register C\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ucsrc](ucsrc) module"]
pub type UCSRC = crate::Reg<u8, _UCSRC>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UCSRC;
#[doc = "`read()` method returns [ucsrc::R](ucsrc::R) reader structure"]
impl crate::Readable for UCSRC {}
#[doc = "`write(|w| ..)` method takes [ucsrc::W](ucsrc::W) writer structure"]
impl crate::Writable for UCSRC {}
#[doc = "USART Control and Status Register C"]
pub mod ucsrc;
#[doc = "USART I/O Data Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [udr](udr) module"]
pub type UDR = crate::Reg<u8, _UDR>;
#[allow(missing_docs)]
#[doc(hidden)]
pub struct _UDR;
#[doc = "`read()` method returns [udr::R](udr::R) reader structure"]
impl crate::Readable for UDR {}
#[doc = "`write(|w| ..)` method takes [udr::W](udr::W) writer structure"]
impl crate::Writable for UDR {}
#[doc = "USART I/O Data Register"]
pub mod udr;