40 val = val | 01 << bit_num;
45 val = val & ~(01 << bit_num);
52 val = val | 01 << bit_num;
54 val = val & ~(01 << bit_num);
58 uint8_t bit_num)
const {
59 return (val >> bit_num) & 01;
uint16_t val
Definition: bits16.h:28
BITS16()
Definition: bits16.h:30
bool bit(uint8_t bit_num) const
Definition: bits16.h:57
void turn_on_bit(uint8_t bit_num)
Definition: bits16.h:38
BITS16(uint16_t init)
Definition: bits16.h:34
void set_bit(uint8_t bit_num, bool value)
Definition: bits16.h:48
void turn_off_bit(uint8_t bit_num)
Definition: bits16.h:43