pub struct DAC {
pub pel_mask: u8,
pub pel_index: u8,
pub state: State,
pub read_index: u8,
pub write_index: u8,
pub combine: [u8; 16],
pub pal: Vec<ColorSpace>,
pub hidac_counter: u8,
/* private fields */
}
Fields§
§pel_mask: u8
§pel_index: u8
color component for next out 03c9, 0 = red, 1 = green, 2 = blue
state: State
§read_index: u8
set by io write to 03c7
write_index: u8
set by io write to 03c8
combine: [u8; 16]
§pal: Vec<ColorSpace>
§hidac_counter: u8
Implementations§
Source§impl DAC
impl DAC
Sourcepub fn set_pel_mask(&mut self, val: u8)
pub fn set_pel_mask(&mut self, val: u8)
(VGA, MCGA) PEL mask register (0x03C6)
Sourcepub fn set_pel_read_index(&mut self, val: u8)
pub fn set_pel_read_index(&mut self, val: u8)
(VGA,MCGA,CEG-VGA) PEL address register (read mode) (0x03C7) Sets DAC in read mode and assign start of color register index (0..255) for following read accesses to 3C9h. Don’t write to 3C9h while in read mode. Next access to 03C8h will stop pending mode immediatly.
Sourcepub fn get_pel_write_index(&mut self) -> u8
pub fn get_pel_write_index(&mut self) -> u8
(VGA,MCGA) PEL address register (0x03C8)
Sourcepub fn set_pel_write_index(&mut self, val: u8)
pub fn set_pel_write_index(&mut self, val: u8)
(VGA,MCGA) PEL address register (write mode) (0x03C8) Sets DAC in write mode and assign start of color register index (0..255) for following write accesses to 3C9h. Next access to 03C8h will stop pending mode immediately.
Sourcepub fn get_pel_data(&mut self) -> u8
pub fn get_pel_data(&mut self) -> u8
(VGA,MCGA) PEL data register (0x03C9) Three consequtive reads (in read mode) in the order: red, green, blue. The internal DAC index is incremented each 3rd access.
Sourcepub fn set_pel_data(&mut self, val: u8)
pub fn set_pel_data(&mut self, val: u8)
(VGA,MCGA) PEL data register (0x03C9) Three consecutive writes (in write mode) in the order: red, green, blue. The internal DAC index is incremented on every 3rd access.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DAC
impl RefUnwindSafe for DAC
impl Send for DAC
impl Sync for DAC
impl Unpin for DAC
impl UnwindSafe for DAC
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more