/// Update the buffer with a hex digit value (0x00 to 0x0F) at the specified index
/// # Arguments
///
/// * `index` - Digit index.
/// * `value` - Value 0x00 to 0x0F.
///
/// # Examples
///
/// ```
/// use ht16k33::i2c_mock::I2cMock;
/// use ht16k33::HT16K33;
/// use adafruit_7segment::{SevenSegment, Index};
///
/// // Create an I2C device.
/// let mut i2c = I2cMock::new();
///
/// // The I2C device address.
/// const DISP_I2C_ADDR: u8 = 112;
///
/// let mut ht16k33 = HT16K33::new(i2c, DISP_I2C_ADDR);
///
/// // Set first digit to 9.
/// ht16k33.update_buffer_with_digit(Index::One, 9);
/// ```
Update the buffer with a hex digit value (0x00 to 0x0F) at the specified index
Update the buffer with a hex digit value ( 0x00 to 0x0F ) at the specified index
fn update_buffer_with_digit(&mut self, index: Index, value: u8) {
        let value = value as usize;
        assert!(value < HEX_NUMBER_FONT_TABLE.len());
        let bits = HEX_NUMBER_FONT_TABLE[value];
        update_bits(self, index, bits);
    }
fn update_buffer_with_digit ( & mut self , index : Index , value : u8 ) { let value = value as usize ; assert ! ( value HEX_NUMBER_FONT_TABLE len ( ) ) ; let bits = HEX_NUMBER_FONT_TABLE [ value ] ; update_bits ( self , index , bits ) ; }
Update the buffer with a hex digit value (0x00 to 0x0F) at the specified index
Update the buffer with a hex digit value ( 0x00 to 0x0F ) at the specified index
&mut self
index
Index
value
u8
examples


Create an I2C device.
let mut i2c = I2cMock::new().

The I2C device address.



Set first digit to 9.
Create an I2C device . let mut i2c = I2cMock :: new () . The I2C device address . Set first digit to 9 .