26 for (
int i = 0; i < 7; i++) {
36 uint16_t shifted_day =
static_cast<uint8_t
>(day) << offset;
38 if (shifted_day & 0b01111111) {
40 return DayOfWeek(
static_cast<uint8_t
>(shifted_day & 0b01111111));
44 return DayOfWeek(
static_cast<uint8_t
>((shifted_day >> 7) & 0b01111111));
uint8_t dayNumber(DayOfWeek day)
Definition: cs_DayOfWeek.h:25
DayOfWeek operator-(DayOfWeek day, int offset)
Definition: cs_DayOfWeek.h:48
DayOfWeek
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Sep 24,...
Definition: cs_DayOfWeek.h:13
uint8_t DayOfWeekBitMask
Definition: cs_DayOfWeek.h:23
DayOfWeek operator+(DayOfWeek day, int offset)
Definition: cs_DayOfWeek.h:34
auto mod(T v, S m) -> decltype(v % m)
Returns the canonical representation of [v] considered as element of Z/mZ, regardless of any silly fe...
Definition: cs_Math.h:77