pub fn create_char(&self, address: u8, bitmap: [u8; 8]) -> Result<u8, &'static str> {
        // send new custom character to cgram address
        match address {
            0...7 => {
                self.command(CGRAM_ADDRESS | address << 3);
                for row in &bitmap {
                    self.send_byte(bitmap[*row as usize], DATA);
                }
                Ok(address)
            },
            _ => Err("address must be between 0 and 7"),
        }

    }
/// Creates a new custom character from a bitmap on the given `address`
Creates a new custom character from a bitmap on the given `address`
Creates a new custom character from a bitmap on the given ` address `
pub fn create_char(&self, address: u8, bitmap: [u8; 8]) -> Result<u8, &'static str> {
        // send new custom character to cgram address
        match address {
            0...7 => {
                self.command(CGRAM_ADDRESS | address << 3);
                for row in &bitmap {
                    self.send_byte(bitmap[*row as usize], DATA);
                }
                Ok(address)
            },
            _ => Err("address must be between 0 and 7"),
        }
    }
pub fn create_char ( & self , address : u8 , bitmap : [ u8 ; 8 ] ) -> Result < u8 , & ' static str > { // send new custom character to cgram address match address { 0 ... 7 => { self . command ( CGRAM_ADDRESS | address << 3 ) ; for row in & bitmap { self . send_byte ( bitmap [ * row as usize ] , DATA ) ; } Ok ( address ) } , _ => Err ( " " ) , } }
Creates a new custom character from a bitmap on the given `address`
Creates a new custom character from a bitmap on the given ` address `
&self
address
u8
bitmap
[u8; 8]
&self
address
u8
bitmap
[u8; 8]