pub fn sccb_send_data(&self, dev_addr: u8, reg_addr: u16, reg_data: u8) {
        use dvp::sccb_cfg::BYTE_NUM_A::*;
        unsafe {
            match self.sccb_addr_len {
                sccb_addr_len::W8 => {
                    self.dvp.sccb_cfg.modify(|_,w| w.byte_num().variant(NUM3));
                    self.dvp.sccb_ctl.write(|w| w.device_address().bits(dev_addr | 1)
                                             .reg_address().bits(reg_addr as u8)
                                             .wdata_byte0().bits(reg_data));
                },
                sccb_addr_len::W16 => {
                    self.dvp.sccb_cfg.modify(|_,w| w.byte_num().variant(NUM4));
                    self.dvp.sccb_ctl.write(|w| w.device_address().bits(dev_addr | 1)
                                             .reg_address().bits((reg_addr >> 8) as u8)
                                             .wdata_byte0().bits((reg_addr & 0xff) as u8)
                                             .wdata_byte1().bits(reg_data));
                },
            }
        }
        self.sccb_start_transfer();
    }
/** Set a register value through SCCB */
Set a register value through SCCB
Set a register value through SCCB
pub fn sccb_send_data(&self, dev_addr: u8, reg_addr: u16, reg_data: u8) {
        use dvp::sccb_cfg::BYTE_NUM_A::*;
        unsafe {
            match self.sccb_addr_len {
                sccb_addr_len::W8 => {
                    self.dvp.sccb_cfg.modify(|_,w| w.byte_num().variant(NUM3));
                    self.dvp.sccb_ctl.write(|w| w.device_address().bits(dev_addr | 1)
                                             .reg_address().bits(reg_addr as u8)
                                             .wdata_byte0().bits(reg_data));
                },
                sccb_addr_len::W16 => {
                    self.dvp.sccb_cfg.modify(|_,w| w.byte_num().variant(NUM4));
                    self.dvp.sccb_ctl.write(|w| w.device_address().bits(dev_addr | 1)
                                             .reg_address().bits((reg_addr >> 8) as u8)
                                             .wdata_byte0().bits((reg_addr & 0xff) as u8)
                                             .wdata_byte1().bits(reg_data));
                },
            }
        }
        self.sccb_start_transfer();
    }
pub fn sccb_send_data ( & self , dev_addr : u8 , reg_addr : u16 , reg_data : u8 ) { use dvp :: sccb_cfg :: BYTE_NUM_A :: * ; unsafe { match self . sccb_addr_len { sccb_addr_len :: W8 => { self . dvp . sccb_cfg . modify ( | _ , w | w . byte_num ( ) . variant ( NUM3 ) ) ; self . dvp . sccb_ctl . write ( | w | w . device_address ( ) . bits ( dev_addr | 1 ) . reg_address ( ) . bits ( reg_addr as u8 ) . wdata_byte0 ( ) . bits ( reg_data ) ) ; } , sccb_addr_len :: W16 => { self . dvp . sccb_cfg . modify ( | _ , w | w . byte_num ( ) . variant ( NUM4 ) ) ; self . dvp . sccb_ctl . write ( | w | w . device_address ( ) . bits ( dev_addr | 1 ) . reg_address ( ) . bits ( ( reg_addr >> 8 ) as u8 ) . wdata_byte0 ( ) . bits ( ( reg_addr & 0xff ) as u8 ) . wdata_byte1 ( ) . bits ( reg_data ) ) ; } , } } self . sccb_start_transfer ( ) ; }
Set a register value through SCCB
Set a register value through SCCB
&self
dev_addr
u8
reg_addr
u16
reg_data
u8
&self
dev_addr
u8
reg_addr
u16
reg_data
u8