|
|
@ -177,6 +177,7 @@ bool qrcodegen_encodeBinary(uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Appends the given sequence of bits to the given byte-based bit buffer, increasing the bit length.
|
|
|
|
// Appends the given sequence of bits to the given byte-based bit buffer, increasing the bit length.
|
|
|
|
|
|
|
|
// Requires 0 <= numBits <= 16 and 0 <= val < 2^numBits.
|
|
|
|
testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen) {
|
|
|
|
testable void appendBitsToBuffer(unsigned int val, int numBits, uint8_t buffer[], int *bitLen) {
|
|
|
|
assert(0 <= numBits && numBits <= 16 && (unsigned long)val >> numBits == 0);
|
|
|
|
assert(0 <= numBits && numBits <= 16 && (unsigned long)val >> numBits == 0);
|
|
|
|
for (int i = numBits - 1; i >= 0; i--, (*bitLen)++)
|
|
|
|
for (int i = numBits - 1; i >= 0; i--, (*bitLen)++)
|
|
|
|