Making pixels of RGB barcode suitable for scanning
This:
static uint8_t rgb[3];
return rgb;

is a problem. Two different callers assuming to have two different copies of the return array will actually only have one, and that breaks re-entrance. Better off to return by value instead of return by reference in this case - particularly if you make a utility struct. A common pattern is to union over a three-element array and a nested struct of red, green and blue components. To ensure that this is valid, you'll need to tell your compiler to use tight packing, typically with #pragma pack. If you have misgivings on the portability of this approach and you need to support multiple exotic compilers, you'll need to ditch the union and instead write a conversion function.
bind and unbind can both be marked static since they're in the same translation unit.
The only other minor thing I see here is that two-space indentation is somewhat non-standard, and 4-space will be more legible.