mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-10 12:47:51 +08:00
fix: exports a couple of macros and adds a wrapper around a macro (#4958)
This commit is contained in:
@@ -170,6 +170,8 @@ fout.write(
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
LV_EXPORT_CONST_INT(LV_DPI_DEF);
|
||||
LV_EXPORT_CONST_INT(LV_DRAW_BUF_STRIDE_ALIGN);
|
||||
LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
|
||||
#endif
|
||||
|
||||
#undef _LV_KCONFIG_PRESENT
|
||||
|
||||
@@ -2958,6 +2958,8 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
LV_EXPORT_CONST_INT(LV_DPI_DEF);
|
||||
LV_EXPORT_CONST_INT(LV_DRAW_BUF_STRIDE_ALIGN);
|
||||
LV_EXPORT_CONST_INT(LV_DRAW_BUF_ALIGN);
|
||||
#endif
|
||||
|
||||
#undef _LV_KCONFIG_PRESENT
|
||||
|
||||
@@ -135,6 +135,14 @@ void lv_canvas_finish_layer(lv_obj_t * canvas, lv_layer_t * layer);
|
||||
|
||||
#define LV_CANVAS_BUF_SIZE(w, h, bpp, stride) (((((w * bpp + 7) >> 3) + stride - 1) & ~(stride - 1)) * h + LV_DRAW_BUF_ALIGN)
|
||||
|
||||
/**
|
||||
* Just a wrapper to `LV_CANVAS_BUF_SIZE` for bindings.
|
||||
*/
|
||||
static inline uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride)
|
||||
{
|
||||
return (uint32_t)LV_CANVAS_BUF_SIZE(w, h, bpp, stride);
|
||||
}
|
||||
|
||||
#endif /*LV_USE_CANVAS*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user