| 848 | } |
| 849 | |
| 850 | bool qrcode_getModule(QRCode *qrcode, uint8_t x, uint8_t y) { |
| 851 | if (x >= qrcode->size || y >= qrcode->size) { |
| 852 | return false; |
| 853 | } |
| 854 | |
| 855 | uint32_t offset = y * qrcode->size + x; |
| 856 | return (qrcode->modules[offset >> 3] & (1 << (7 - (offset & 0x07)))) != 0; |
| 857 | } |