CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
QrRaster.cpp File Reference

QR encoding into a packed 1-bpp raster via espressif/qrcode. More...

#include "cdc_views/QrRaster.h"
#include "qrcode.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::ui
 Centralized key-code constants for cdc_views.
namespace  cdc::ui::qr

Functions

int cdc::ui::qr::measure (const char *data, uint8_t max_version, uint8_t ecc, uint16_t *out_modules)
 Measures the module count for data without rendering.
int cdc::ui::qr::render (const char *data, uint8_t max_version, uint8_t ecc, uint8_t scale, uint8_t quiet_modules, uint8_t *out, size_t out_size, uint16_t *out_stride_bytes, uint16_t *out_height_px)
 Encodes data and packs it into a 1-bpp raster.

Detailed Description

QR encoding into a packed 1-bpp raster via espressif/qrcode.

The qrcode display callback carries no usable user_data round-trip, so a file-static context struct holds the target buffer (the QRCodeView pattern). A static mutex serialises concurrent callers - plugin WASM frames can run on more than one task.

Definition in file QrRaster.cpp.