Trait avr_oxide::util::datatypes::BitMaskable

source ·
pub trait BitMaskable {
    // Required methods
    fn negative_byte_mask(self) -> u8;
    fn positive_byte_mask(self) -> u8;
    fn lo_bit_index(self) -> u8;
}
Expand description

Trait for things that can be turned into a bitmask

Required Methods§

source

fn negative_byte_mask(self) -> u8

Return a ‘negative’ mask (that is, the only bit that is UNset is the one corresponding to this bit) for this bit in its byte within the field.

source

fn positive_byte_mask(self) -> u8

Return a ‘positive’ mask (that is, the only bit that is set is the one corresponding to this bit) for this bit in its byte within the field.

source

fn lo_bit_index(self) -> u8

Return the index of this bit within its byte within the field (i.e. the left-shift of this bit)

Implementors§