Struct nvapi::I2c
[−]
[src]
pub struct I2c<G = PhysicalGpu> { /* fields omitted */ }
Methods
impl<G> I2c<G>
[src]
pub fn new(gpu: G, display_mask: u32) -> Self
[src]
pub fn set_display_mask(&mut self, display_mask: u32)
[src]
pub fn set_address(&mut self, address: u8)
[src]
pub fn set_port(&mut self, port: Option<u8>, port_is_ddc: bool)
[src]
pub fn set_speed(&mut self, speed: I2cSpeed)
[src]
impl<G: Borrow<PhysicalGpu>> I2c<G>
[src]
pub fn nvapi_read(&self, register: &[u8], bytes: &mut [u8]) -> Result<usize>
[src]
pub fn nvapi_write(&self, register: &[u8], bytes: &[u8]) -> Result<()>
[src]
Trait Implementations
impl<G> Master for I2c<G>
[src]
impl<G> Address for I2c<G>
[src]
fn set_slave_address(&mut self, addr: u16, tenbit: bool) -> Result<()>
[src]
Sets the current slave to address. Read more
impl<G: Borrow<PhysicalGpu>> ReadWrite for I2c<G>
[src]
fn i2c_read(&mut self, value: &mut [u8]) -> Result<usize, Self::Error>
[src]
Initiate an isolated read transfer on the I2C bus, followed by a STOP.
fn i2c_write(&mut self, value: &[u8]) -> Result<(), Self::Error>
[src]
Initiate an isolated write transfer on the I2C bus, followed by a STOP.
impl<G: Borrow<PhysicalGpu>> Smbus for I2c<G>
[src]
fn smbus_write_quick(&mut self, value: bool) -> Result<(), Self::Error>
[src]
Sends a single bit to the device, in the place of the rd/wr address bit.
fn smbus_read_byte(&mut self) -> Result<u8, Self::Error>
[src]
Reads a single byte from a device without specifying a register.
fn smbus_write_byte(&mut self, value: u8) -> Result<(), Self::Error>
[src]
Sends a single byte to the device
fn smbus_read_byte_data(&mut self, command: u8) -> Result<u8, Self::Error>
[src]
Reads a byte from the designated register.
fn smbus_write_byte_data(
&mut self,
command: u8,
value: u8
) -> Result<(), Self::Error>
[src]
&mut self,
command: u8,
value: u8
) -> Result<(), Self::Error>
Writes a byte to the designated register.
fn smbus_read_word_data(&mut self, command: u8) -> Result<u16, Self::Error>
[src]
Reads a 16-bit word from the designated register.
fn smbus_write_word_data(
&mut self,
command: u8,
value: u16
) -> Result<(), Self::Error>
[src]
&mut self,
command: u8,
value: u16
) -> Result<(), Self::Error>
Writes a 16-bit word to the designated register.
fn smbus_process_call(
&mut self,
command: u8,
value: u16
) -> Result<u16, Self::Error>
[src]
&mut self,
command: u8,
value: u16
) -> Result<u16, Self::Error>
Writes a 16-bit word to the specified register, then reads a 16-bit word in response. Read more
fn smbus_read_block_data(
&mut self,
command: u8,
value: &mut [u8]
) -> Result<usize, Self::Error>
[src]
&mut self,
command: u8,
value: &mut [u8]
) -> Result<usize, Self::Error>
Reads up to 32 bytes from the designated device register. Read more
fn smbus_write_block_data(
&mut self,
command: u8,
value: &[u8]
) -> Result<(), Self::Error>
[src]
&mut self,
command: u8,
value: &[u8]
) -> Result<(), Self::Error>
Writes up to 32 bytes to the designated device register.
impl<G: Borrow<PhysicalGpu>> BlockTransfer for I2c<G>
[src]
fn i2c_read_block_data(
&mut self,
command: u8,
value: &mut [u8]
) -> Result<usize, Self::Error>
[src]
&mut self,
command: u8,
value: &mut [u8]
) -> Result<usize, Self::Error>
Reads a block of bytes from the designated device register. Read more
fn i2c_write_block_data(
&mut self,
command: u8,
value: &[u8]
) -> Result<(), Self::Error>
[src]
&mut self,
command: u8,
value: &[u8]
) -> Result<(), Self::Error>
Writes a block of bytes to the designated device register. Read more