Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
473 B

/*
* Copyright (c) 2018 Jan Van Winkel <jan.van_winkel@dxplore.eu>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "lvgl_mem.h"
#include <zephyr.h>
#include <init.h>
#include <misc/mempool.h>
K_MEM_POOL_DEFINE(lvgl_mem_pool,
CONFIG_LVGL_MEM_POOL_MIN_SIZE,
CONFIG_LVGL_MEM_POOL_MAX_SIZE,
CONFIG_LVGL_MEM_POOL_NUMBER_BLOCKS, 4);
void *lvgl_malloc(size_t size)
{
return k_mem_pool_malloc(&lvgl_mem_pool, size);
}
void lvgl_free(void *ptr)
{
k_free(ptr);
}