lv_qrcode.h

Functions

lv_obj_t *lv_qrcode_create(lv_obj_t *parent)

Create an empty QR code (an lv_canvas) object.

Parameters:

parent – point to an object where to create the QR code

Returns:

pointer to the created QR code object

void lv_qrcode_set_size(lv_obj_t *obj, int32_t size)

Set QR code size.

Parameters:
  • obj – pointer to a QR code object

  • size – width and height of the QR code

void lv_qrcode_set_dark_color(lv_obj_t *obj, lv_color_t color)

Set QR code dark color.

Parameters:
  • obj – pointer to a QR code object

  • color – dark color of the QR code

void lv_qrcode_set_light_color(lv_obj_t *obj, lv_color_t color)

Set QR code light color.

Parameters:
  • obj – pointer to a QR code object

  • color – light color of the QR code

lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len)

Set the data of a QR code object

Parameters:
  • obj – pointer to a QR code object

  • data – data to display

  • data_len – length of data in bytes

Returns:

LV_RESULT_OK: if no error; LV_RESULT_INVALID: on error

Variables

const lv_obj_class_t lv_qrcode_class