| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#include "lv_pxp_cfg.h" |
| 17 |
|
| 18 |
#if LV_USE_PXP |
| 19 |
#if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP |
| 20 |
#include "lv_pxp_osa.h" |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
static pxp_cfg_t * _pxp_cfg; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
void lv_pxp_init(void) |
| 49 |
{ |
| 50 |
_pxp_cfg = pxp_get_default_cfg(); |
| 51 |
|
| 52 |
PXP_Init(PXP_ID); |
| 53 |
|
| 54 |
PXP_EnableCsc1(PXP_ID, false); |
| 55 |
PXP_SetProcessBlockSize(PXP_ID, kPXP_BlockSize16); |
| 56 |
|
| 57 |
PXP_EnableInterrupts(PXP_ID, kPXP_CompleteInterruptEnable); |
| 58 |
|
| 59 |
_pxp_cfg->pxp_interrupt_init(); |
| 60 |
} |
| 61 |
|
| 62 |
void lv_pxp_deinit(void) |
| 63 |
{ |
| 64 |
_pxp_cfg->pxp_interrupt_deinit(); |
| 65 |
PXP_DisableInterrupts(PXP_ID, kPXP_CompleteInterruptEnable); |
| 66 |
PXP_Deinit(PXP_ID); |
| 67 |
} |
| 68 |
|
| 69 |
void lv_pxp_reset(void) |
| 70 |
{ |
| 71 |
PXP_ResetControl(PXP_ID); |
| 72 |
|
| 73 |
PXP_EnableCsc1(PXP_ID, false); |
| 74 |
PXP_SetProcessBlockSize(PXP_ID, kPXP_BlockSize16); |
| 75 |
} |
| 76 |
|
| 77 |
void lv_pxp_run(void) |
| 78 |
{ |
| 79 |
_pxp_cfg->pxp_run(); |
| 80 |
_pxp_cfg->pxp_wait(); |
| 81 |
} |
| 82 |
|
| 83 |
void lv_pxp_wait(void) |
| 84 |
{ |
| 85 |
_pxp_cfg->pxp_wait(); |
| 86 |
} |
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
#endif |
| 93 |
#endif |