1 use core
::ptr
::{read_volatile, write_volatile}
;
2 use core
::mem
::uninitialized
;
3 use core
::ops
::{BitAnd, BitOr, Not}
;
13 /// Create a new Mmio without initializing
14 pub fn new() -> Self {
16 value
: unsafe { uninitialized() }
21 impl<T
> Io
for Mmio
<T
> where T
: Copy
+ PartialEq
+ BitAnd
<Output
= T
> + BitOr
<Output
= T
> + Not
<Output
= T
> {
25 unsafe { read_volatile(&self.value) }
28 fn write(&mut self, value
: T
) {
29 unsafe { write_volatile(&mut self.value, value) }
;