MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / writeBit

Function writeBit

external/floppybridge/src/ArduinoInterface.cpp:930–940  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928}
929
930void writeBit(unsigned char* output, int& pos, int& bit, int value, const int maxLength) {
931 if (pos >= maxLength) return;
932
933 output[pos] <<= 1;
934 output[pos] |= value;
935 bit++;
936 if (bit >= 8) {
937 pos++;
938 bit = 0;
939 }
940}
941
942void unpack(const unsigned char* data, unsigned char* output, const int maxLength) {
943 int pos = 0;

Callers 1

unpackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected