lv_qrcode.h

Functions

lv_obj_t *lv_qrcode_create(lv_obj_t *parent)

Create an empty QR code (an lv_canvas) object.

参数:

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

返回:

pointer to the created QR code object

void lv_qrcode_set_size(lv_obj_t *obj, int32_t size)

Set QR code size.

参数:
  • 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.

参数:
  • 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.

参数:
  • 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

参数:
  • obj -- pointer to a QR code object

  • data -- data to display

  • data_len -- length of data in bytes

返回:

LV_RESULT_OK: if no error; LV_RESULT_INVALID: on error

Variables

const lv_obj_class_t lv_qrcode_class