Keep a context variable around with a bit mask for all logic channels.
This is convenient in setup and generation routines, to avoid garbage
in unassigned bit positions of session feed packets.
devc->cur_samplerate = SR_KHZ(200);
devc->num_logic_channels = num_logic_channels;
devc->logic_unitsize = (devc->num_logic_channels + 7) / 8;
+ devc->all_logic_channels_mask = 1UL << 0;
+ devc->all_logic_channels_mask <<= devc->num_logic_channels;
+ devc->all_logic_channels_mask--;
devc->logic_pattern = DEFAULT_LOGIC_PATTERN;
devc->num_analog_channels = num_analog_channels;
/* Logic */
int32_t num_logic_channels;
size_t logic_unitsize;
+ uint64_t all_logic_channels_mask;
/* There is only ever one logic channel group, so its pattern goes here. */
enum logic_pattern_type logic_pattern;
uint8_t logic_data[LOGIC_BUFSIZE];