1 /* 2 * Copyright 2017, 2020 NXP 3 * All rights reserved. 4 * 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #ifndef _FSL_RM67191_H_ 10 #define _FSL_RM67191_H_ 11 12 #include "fsl_display.h" 13 #include "fsl_mipi_dsi_cmd.h" 14 15 /* 16 * Change log: 17 * 18 * 1.1.0 19 * - Fix MISRA-C 2012 issues. 20 * - Change rm67191_resource_t structure. 21 * 22 * 1.0.0 23 * - Initial version 24 */ 25 26 /******************************************************************************* 27 * Definitions 28 ******************************************************************************/ 29 #define RM67191_NOP (0x00) 30 #define RM67191_SWRESET (0x01) 31 #define RM67191_RDDID (0x04) 32 #define RM67191_RDNUMED (0x05) 33 #define RM67191_RDDPM (0x0A) 34 #define RM67191_RDDMADCTR (0x0B) 35 #define RM67191_RDDCOLMOD (0x0C) 36 #define RM67191_RDDIM (0x0D) 37 #define RM67191_RDDSM (0x0E) 38 #define RM67191_RDDSDR (0x0F) 39 #define RM67191_SLPIN (0x10) 40 #define RM67191_SLPOUT (0x11) 41 #define RM67191_INVOFF (0x20) 42 #define RM67191_INVON (0x21) 43 #define RM67191_ALLPOFF (0x22) 44 #define RM67191_ALLPON (0x23) 45 #define RM67191_DISPOFF (0x28) 46 #define RM67191_DISPON (0x29) 47 #define RM67191_RAMWR (0x2C) 48 #define RM67191_TEOFF (0x34) 49 #define RM67191_TEON (0x35) 50 #define RM67191_MADCTR (0x36) 51 #define RM67191_IDMOFF (0x38) 52 #define RM67191_IDMON (0x39) 53 #define RM67191_COLMOD (0x3A) 54 #define RM67191_RAMWRC (0x3C) 55 #define RM67191_STES (0x44) 56 #define RM67191_GSL (0x45) 57 #define RM67191_DSTBON (0x4F) 58 #define RM67191_WRDISBV (0x51) 59 #define RM67191_RDDISBV (0x52) 60 #define RM67191_WRCTRLD (0x53) 61 #define RM67191_RDCTRLD (0x54) 62 #define RM67191_WRRADACL (0x55) 63 #define RM67191_RDRADACL (0x56) 64 #define RM67191_WRCE (0x58) 65 #define RM67191_RDCE (0x59) 66 #define RM67191_WRCE1 (0x5A) 67 #define RM67191_RDCE1 (0x5B) 68 #define RM67191_WRCE2 (0x5C) 69 #define RM67191_RDCE2 (0x5D) 70 #define RM67191_WRTMR (0x62) 71 #define RM67191_RDTMR (0x63) 72 #define RM67191_WRPA (0x64) 73 #define RM67191_RDPA (0x65) 74 #define RM67191_WRWB (0x66) 75 #define RM67191_RDWB (0x67) 76 #define RM67191_WRCEMODE (0x68) 77 #define RM67191_RDCEMODE (0x69) 78 #define RM67191_RDDDBS (0xA1) 79 #define RM67191_RDDDBC (0xA8) 80 #define RM67191_RDFC (0xAA) 81 #define RM67191_RDCC (0xAF) 82 #define RM67191_SETDSIMODE (0xC2) 83 #define RM67191_RDCTRLD1 (0xDA) 84 #define RM67191_RDCTRLD2 (0xDB) 85 #define RM67191_RDCTRLD3 (0xDC) 86 #define RM67191_WRMAUCCTR (0xFE) 87 #define RM67191_RDMAUCCTR (0xFF) 88 89 /*! 90 * @brief RM67191 resource. 91 */ 92 typedef struct _rm67191_resource 93 { 94 mipi_dsi_device_t *dsiDevice; /*!< MIPI DSI device. */ 95 void (*pullResetPin)(bool pullUp); /*!< Function to pull reset pin high or low. */ 96 } rm67191_resource_t; 97 98 extern const display_operations_t rm67191_ops; 99 100 /******************************************************************************* 101 * API 102 ******************************************************************************/ 103 104 #if defined(__cplusplus) 105 extern "C" { 106 #endif 107 108 status_t RM67191_Init(display_handle_t *handle, const display_config_t *config); 109 110 status_t RM67191_Deinit(display_handle_t *handle); 111 112 status_t RM67191_Start(display_handle_t *handle); 113 114 status_t RM67191_Stop(display_handle_t *handle); 115 116 #if defined(__cplusplus) 117 } 118 #endif 119 120 #endif /* _FSL_RM67191_H_ */ 121