1 /** 2 * @file lv_pxp_cfg.h 3 * 4 */ 5 6 /** 7 * Copyright 2020-2023 NXP 8 * 9 * SPDX-License-Identifier: MIT 10 */ 11 12 #ifndef LV_PXP_CFG_H 13 #define LV_PXP_CFG_H 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 /********************* 20 * INCLUDES 21 *********************/ 22 23 #include "../../../lv_conf_internal.h" 24 25 #if LV_USE_PXP 26 #if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP 27 #include "fsl_cache.h" 28 #include "fsl_pxp.h" 29 30 #include "../../../misc/lv_log.h" 31 32 /********************* 33 * DEFINES 34 *********************/ 35 36 /** PXP module instance to use*/ 37 #define PXP_ID PXP 38 39 /** PXP interrupt line ID*/ 40 #define PXP_IRQ_ID PXP_IRQn 41 42 /********************** 43 * TYPEDEFS 44 **********************/ 45 46 /** 47 * NXP PXP device configuration. 48 */ 49 typedef struct { 50 /** Callback for PXP interrupt initialization*/ 51 void (*pxp_interrupt_init)(void); 52 53 /** Callback for PXP interrupt de-initialization*/ 54 void (*pxp_interrupt_deinit)(void); 55 56 /** Callback for PXP start*/ 57 void (*pxp_run)(void); 58 59 /** Callback for waiting of PXP completion*/ 60 void (*pxp_wait)(void); 61 } pxp_cfg_t; 62 63 /********************** 64 * GLOBAL PROTOTYPES 65 **********************/ 66 67 /** 68 * Reset and initialize PXP device. This function should be called as a part 69 * of display init sequence. 70 */ 71 void lv_pxp_init(void); 72 73 /** 74 * Disable PXP device. Should be called during display deinit sequence. 75 */ 76 void lv_pxp_deinit(void); 77 78 /** 79 * Reset PXP device. 80 */ 81 void lv_pxp_reset(void); 82 83 /** 84 * Clear cache and start PXP. 85 */ 86 void lv_pxp_run(void); 87 88 /** 89 * Wait for PXP completion. 90 */ 91 void lv_pxp_wait(void); 92 93 /********************** 94 * MACROS 95 **********************/ 96 97 #endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/ 98 #endif /*LV_USE_PXP*/ 99 100 #ifdef __cplusplus 101 } /*extern "C"*/ 102 #endif 103 104 #endif /*LV_PXP_CFG_H*/ 105