fn update_buffer_with_dot(&mut self, index: Index, dot_on: bool) {
        let pos: u8;
        if index > Index::Two {
            // Move one step to compensate for colon at pos 2.
            pos = u8::from(index) + 1u8;
        } else {
            pos = index.into();
        }
        set_bit(self, pos, DOT_BIT, dot_on);
    }
/// Update the buffer to turn the . on or off at the specified index
/// # Arguments
///
/// * `index` - Digit index.
/// * `dot_on` - Enable or disable the dot.
///
/// # 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);
///
/// // Enable dot for first digit.
/// ht16k33.update_buffer_with_dot(Index::One, true);
/// ```
Update the buffer to turn the . on or off at the specified index
Update the buffer to turn the . on or off at the specified index
fn update_buffer_with_dot(&mut self, index: Index, dot_on: bool) {
        let pos: u8;
        if index > Index::Two {
            // Move one step to compensate for colon at pos 2.
            pos = u8::from(index) + 1u8;
        } else {
            pos = index.into();
        }
        set_bit(self, pos, DOT_BIT, dot_on);
    }
fn update_buffer_with_dot ( & mut self , index : Index , dot_on : bool ) { let pos : u8 ; if index > Index :: Two { // Move one step to compensate for colon at pos 2. pos = u8 :: from ( index ) + 1u8 ; } else { pos = index . into ( ) ; } set_bit ( self , pos , DOT_BIT , dot_on ) ; }
Update the buffer to turn the .
Update the buffer to turn the .
&mut self
index
Index
dot_on
bool
&mut self
index
Index
dot_on
bool
examples


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

The I2C device address.



Enable dot for first digit.
ht16k33.update_buffer_with_dot(Index::One, true);
```
Create an I2C device . let mut i2c = I2cMock :: new () . The I2C device address . Enable dot for first digit . ht16k33 . update_buffer_with_dot ( Index :: One true ) ; ` ` `