LV_DRAW_BUF_DEFINE_STATIC macro
Define a static draw buffer with the given width, height, and color format. Stride alignment is set to LV_DRAW_BUF_STRIDE_ALIGN. For platform that needs special buffer alignment, call LV_DRAW_BUF_INIT_STATIC.
Syntax
#define LV_DRAW_BUF_DEFINE_STATIC(name, _w, _h, _cf) \
static uint8_t buf_##name[LV_DRAW_BUF_SIZE(_w, _h, _cf)]; \
static lv_draw_buf_t name = { \
.header = { \
.magic = LV_IMAGE_HEADER_MAGIC, \
.cf = (_cf), \
.flags = LV_IMAGE_FLAGS_MODIFIABLE, \
.w = (_w), \
.h = (_h), \
.stride = LV_DRAW_BUF_STRIDE(_w, _cf), \
.reserved_2 = 0, \
}, \
.data_size = sizeof(buf_##name), \
.data = buf_##name, \
.unaligned_data = buf_##name, \
}