fix: exports a couple of macros and adds a wrapper around a macro (#4958)

This commit is contained in:
Kevin Schlosser
2023-12-07 14:18:19 -07:00
committed by GitHub
parent f969719f4e
commit 3bf59dedb2
3 changed files with 12 additions and 0 deletions
+2
View File
@@ -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
+2
View File
@@ -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
+8
View File
@@ -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