Aligned access to video memory

Good afternoon!

I am porting your library to a video controller. They only support 2 byte aligned memory accesses.
Can you add the ability to specify your own implementation of the memcpy and memset functions in the configuration file? Now you can only set the flag for using standard functions.
Or is it possible to create a custom function to copy video data to the frame buffer? I had to make changes to your library to get it working correctly with my video controller.

void * _lv_memcpy(void * dst, const void * src, size_t len)
{
	if ((int)dst >= (int)EXT_MEM_16 || (int)src >= (int)EXT_MEM_16)
	{
		uint16_t* d = (uint16_t*)dst;
		uint16_t* s = (uint16_t*)src;
		len = len / 2;
		while (len)
		{
			*d++ = *s++;
			len--;
		}
		return dst;
	}
	else
	{
		return memcpy(dst, src, len);
	}
}

void _lv_memset(void * dst, uint8_t v, size_t len)
{
	if ((int)dst >= (int)EXT_MEM_16)
	{
		uint16_t* d = (uint16_t*)dst;
		uint16_t v16 = v | v << 8;
		len = len / 2;
		while (len)
		{
			*d++ = v16;
			len--;
		}
	}
	else
	{
		memset(dst, v, len);
	}
}

I would suggest overriding the standard functions if you have platform-specific requirements, since this would apply to all memory accesses, not just those by LVGL.

Aligned access requirements apply only to the framebuffer. Only lvgl will access the framebuffer.