<commit_before>/**
 * @file lv_gpu_stm32_dma2d.c
 *
 */

/*********************
 *      INCLUDES
 *********************/
#include "lv_gpu_stm32_dma2d.h"
#include "../lv_core/lv_refr.h"

#if LV_USE_GPU_STM32_DMA2D
#include "stm32f7xx_hal.h"

/*********************
 *      DEFINES
 *********************/

#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP
#define DMA2D_OUTPUT_FORMAT DMA2D_OUTPUT_RGB565
#define DMA2D_INPUT_FORMAT DMA2D_INPUT_RGB565
#elif LV_COLOR_DEPTH == 32
#define DMA2D_OUTPUT_FORMAT DMA2D_OUTPUT_ARGB8888
#define DMA2D_INPUT_FORMAT DMA2D_INPUT_ARGB8888
#else
/*Can't use GPU with other formats*/
#undef LV_USE_GPU_STM32_DMA2D
#endif

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/
static void dma2d_wait(void);

/**********************
 *  STATIC VARIABLES
 **********************/
static DMA2D_HandleTypeDef hdma2d;

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/

/**
 * Fill an area in the buffer with a color<commit_msg>DMA2D fix with 16 bit color depth<commit_after>/**
 * @file lv_gpu_stm32_dma2d.c
 *
 */

/*********************
 *      INCLUDES
 *********************/
#include "lv_gpu_stm32_dma2d.h"
#include "../lv_core/lv_refr.h"

#if LV_USE_GPU_STM32_DMA2D
#include "stm32f7xx_hal.h"

/*********************
 *      DEFINES
 *********************/

#if LV_COLOR_16_SWAP
#error "Can't use DMA2D with LV_COLOR_16_SWAP 1"
#endif

#if LV_COLOR_DEPTH == 8
#error "Can't use DMA2D with LV_COLOR_DEPTH == 8"
#endif

#if LV_COLOR_DEPTH == 16
#define DMA2D_OUTPUT_FORMAT DMA2D_OUTPUT_RGB565
#define DMA2D_INPUT_FORMAT DMA2D_INPUT_RGB565
#elif LV_COLOR_DEPTH == 32
#define DMA2D_OUTPUT_FORMAT DMA2D_OUTPUT_ARGB8888
#define DMA2D_INPUT_FORMAT DMA2D_INPUT_ARGB8888
#else
/*Can't use GPU with other formats*/
#endif

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 *  STATIC PROTOTYPES
 **********************/
static void dma2d_wait(void);

/**********************
 *  STATIC VARIABLES
 **********************/
static DMA2D_HandleTypeDef hdma2d;

/**********************
 *      MACROS
 **********************/

/**********************
 *   GLOBAL FUNCTIONS
 **********************/

/**
 * Fill an area in the buffer with a color
{'fraction_non_alphanumeric': 0.3278481012658228, 'fraction_numerical': 0.04177215189873418, 'mean_word_length': 5.373655913978495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3928899', 'n_tokens_mistral': 905, 'n_tokens_neox': 839, 'n_words': 153}