fix tests
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
|
||||
#if LV_USE_FILESYSTEM
|
||||
static int compare_fonts(lv_font_t * f1, lv_font_t * f2);
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* STATIC VARIABLES
|
||||
@@ -48,6 +50,7 @@ extern lv_font_t font_3;
|
||||
|
||||
void lv_test_font_loader(void)
|
||||
{
|
||||
#if LV_USE_FILESYSTEM
|
||||
lv_font_t * font_1_bin = lv_font_load("f:font_1.fnt");
|
||||
lv_font_t * font_2_bin = lv_font_load("f:font_2.fnt");
|
||||
lv_font_t * font_3_bin = lv_font_load("f:font_3.fnt");
|
||||
@@ -59,8 +62,10 @@ void lv_test_font_loader(void)
|
||||
lv_font_free(font_1_bin);
|
||||
lv_font_free(font_2_bin);
|
||||
lv_font_free(font_3_bin);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if LV_USE_FILESYSTEM
|
||||
static int compare_fonts(lv_font_t * f1, lv_font_t * f2)
|
||||
{
|
||||
lv_test_assert_true(f1 != NULL && f2 != NULL, "font not null");
|
||||
@@ -198,7 +203,7 @@ static int compare_fonts(lv_font_t * f1, lv_font_t * f2)
|
||||
LV_LOG_INFO("No differences found!");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
|
||||
@@ -23,6 +23,7 @@ int main(void)
|
||||
}
|
||||
|
||||
|
||||
#if LV_USE_FILESYSTEM
|
||||
static lv_fs_res_t open_cb(struct _lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode)
|
||||
{
|
||||
(void) drv;
|
||||
@@ -77,6 +78,7 @@ static bool ready_cb(struct _lv_fs_drv_t * drv)
|
||||
(void) drv;
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void hal_init(void)
|
||||
{
|
||||
@@ -91,6 +93,7 @@ static void hal_init(void)
|
||||
disp_drv.flush_cb = dummy_flush_cb;
|
||||
lv_disp_drv_register(&disp_drv);
|
||||
|
||||
#if LV_USE_FILESYSTEM
|
||||
lv_fs_drv_t drv;
|
||||
lv_fs_drv_init(&drv); /*Basic initialization*/
|
||||
|
||||
@@ -103,10 +106,10 @@ static void hal_init(void)
|
||||
drv.seek_cb = seek_cb; /*Callback to seek in a file (Move cursor) */
|
||||
drv.tell_cb = tell_cb; /*Callback to tell the cursor position */
|
||||
|
||||
lv_fs_drv_register(&drv); /*Finally register the drive*/
|
||||
lv_fs_drv_register(&drv); /*Finally register the drive*/
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static void dummy_flush_cb(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
|
||||
{
|
||||
LV_UNUSED(area);
|
||||
|
||||
Reference in New Issue
Block a user