Replace int pow(2, x) in pico unicorn
Using double pow here seems a bit inefficient (even if it's init code)
This commit is contained in:
parent
b9a8c0a536
commit
a4f91a93ee
|
@ -177,7 +177,7 @@ namespace pimoroni {
|
|||
uint8_t row_select_mask = ~(1 << (7 - row));
|
||||
bitstream[row_select_offset] = row_select_mask;
|
||||
|
||||
uint16_t bcd_ticks = pow(2, frame);
|
||||
uint16_t bcd_ticks = 1 << frame;
|
||||
bitstream[bcd_offset + 1] = (bcd_ticks & 0xff00) >> 8;
|
||||
bitstream[bcd_offset] = (bcd_ticks & 0xff);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue