MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / write_bits

Function write_bits

arch/brother/encoder.cc:37–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static void write_bits(
38 std::vector<bool>& bits, unsigned& cursor, uint32_t data, int width)
39{
40 cursor += width;
41 for (int i = 0; i < width; i++)
42 {
43 unsigned pos = cursor - i - 1;
44 if (pos < bits.size())
45 bits[pos] = data & 1;
46 data >>= 1;
47 }
48}
49
50static void write_sector_header(
51 std::vector<bool>& bits, unsigned& cursor, int track, int sector)

Callers 2

write_sector_headerFunction · 0.70
write_sector_dataFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected