pub fn display_digit(&mut self, position: u8, digit: u8) -> Result<(), Error<E>> {

        // TO DO: include hex digits:
        // 0x00 - 0x0f: Displays a single digit 0-9 or hexadecimal digit A-F.

        if position > 3 ||
           digit > 9 {
            return Err(Error::InvalidInputData);
            } else {                
                self.write(&[Register::POSITION_SETTING, position, digit])?
            };
        
        Ok(())

    }
/// Write digit D at position P
Write digit D at position P
Write digit D at position P
pub fn display_digit(&mut self, position: u8, digit: u8) -> Result<(), Error<E>> {
        // TO DO: include hex digits:
        // 0x00 - 0x0f: Displays a single digit 0-9 or hexadecimal digit A-F.
        if position > 3 ||
           digit > 9 {
            return Err(Error::InvalidInputData);
            } else {                
                self.write(&[Register::POSITION_SETTING, position, digit])?
            };
        Ok(())
    }
pub fn display_digit ( & mut self , position : u8 , digit : u8 ) -> Result < ( ) , Error < E > > { // TO DO: include hex digits: // 0x00 - 0x0f: Displays a single digit 0-9 or hexadecimal digit A-F. if position > 3 || digit > 9 { return Err ( Error :: InvalidInputData ) ; } else { self . write ( & [ Register :: POSITION_SETTING , position , digit ] ) ? } ; Ok ( ( ) ) }
Write digit D at position P
Write digit D at position P
&mut self
position
u8
digit
u8
&mut self
position
u8
digit
u8