General cleanup, use _BV

This commit is contained in:
Scott Lahteine
2021-01-16 19:03:06 -06:00
parent ae53998a88
commit efc396bd05
19 changed files with 56 additions and 81 deletions

View File

@ -93,8 +93,8 @@ namespace DirectStepping {
static constexpr int DIRECTIONAL = dir ? 1 : 0;
static constexpr int SEGMENTS = segments;
static constexpr int NUM_SEGMENTS = 1 << BITS_SEGMENT;
static constexpr int SEGMENT_STEPS = (1 << (BITS_SEGMENT - DIRECTIONAL)) - 1;
static constexpr int NUM_SEGMENTS = _BV(BITS_SEGMENT);
static constexpr int SEGMENT_STEPS = _BV(BITS_SEGMENT - DIRECTIONAL) - 1;
static constexpr int TOTAL_STEPS = SEGMENT_STEPS * SEGMENTS;
static constexpr int PAGE_SIZE = (NUM_AXES * BITS_SEGMENT * SEGMENTS) / 8;