Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_NUCLEO_F401RE/stm32f4xx_hal_dsi.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 110:165afa46840b
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 110:165afa46840b | 1 | /** |
Kojto | 110:165afa46840b | 2 | ****************************************************************************** |
Kojto | 110:165afa46840b | 3 | * @file stm32f4xx_hal_dsi.h |
Kojto | 110:165afa46840b | 4 | * @author MCD Application Team |
Kojto | 110:165afa46840b | 5 | * @version V1.4.1 |
Kojto | 110:165afa46840b | 6 | * @date 09-October-2015 |
Kojto | 110:165afa46840b | 7 | * @brief Header file of DSI HAL module. |
Kojto | 110:165afa46840b | 8 | ****************************************************************************** |
Kojto | 110:165afa46840b | 9 | * @attention |
Kojto | 110:165afa46840b | 10 | * |
Kojto | 110:165afa46840b | 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
Kojto | 110:165afa46840b | 12 | * |
Kojto | 110:165afa46840b | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 110:165afa46840b | 14 | * are permitted provided that the following conditions are met: |
Kojto | 110:165afa46840b | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 110:165afa46840b | 16 | * this list of conditions and the following disclaimer. |
Kojto | 110:165afa46840b | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 110:165afa46840b | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 110:165afa46840b | 19 | * and/or other materials provided with the distribution. |
Kojto | 110:165afa46840b | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 110:165afa46840b | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 110:165afa46840b | 22 | * without specific prior written permission. |
Kojto | 110:165afa46840b | 23 | * |
Kojto | 110:165afa46840b | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 110:165afa46840b | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 110:165afa46840b | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 110:165afa46840b | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 110:165afa46840b | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 110:165afa46840b | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 110:165afa46840b | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 110:165afa46840b | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 110:165afa46840b | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 110:165afa46840b | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 110:165afa46840b | 34 | * |
Kojto | 110:165afa46840b | 35 | ****************************************************************************** |
Kojto | 110:165afa46840b | 36 | */ |
Kojto | 110:165afa46840b | 37 | |
Kojto | 110:165afa46840b | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 110:165afa46840b | 39 | #ifndef __STM32F4xx_HAL_DSI_H |
Kojto | 110:165afa46840b | 40 | #define __STM32F4xx_HAL_DSI_H |
Kojto | 110:165afa46840b | 41 | |
Kojto | 110:165afa46840b | 42 | #ifdef __cplusplus |
Kojto | 110:165afa46840b | 43 | extern "C" { |
Kojto | 110:165afa46840b | 44 | #endif |
Kojto | 110:165afa46840b | 45 | |
Kojto | 110:165afa46840b | 46 | #if defined(STM32F469xx) || defined(STM32F479xx) |
Kojto | 110:165afa46840b | 47 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 48 | #include "stm32f4xx_hal_def.h" |
Kojto | 110:165afa46840b | 49 | |
Kojto | 110:165afa46840b | 50 | /** @addtogroup STM32F4xx_HAL_Driver |
Kojto | 110:165afa46840b | 51 | * @{ |
Kojto | 110:165afa46840b | 52 | */ |
Kojto | 110:165afa46840b | 53 | |
Kojto | 110:165afa46840b | 54 | /** @defgroup DSI DSI |
Kojto | 110:165afa46840b | 55 | * @brief DSI HAL module driver |
Kojto | 110:165afa46840b | 56 | * @{ |
Kojto | 110:165afa46840b | 57 | */ |
Kojto | 110:165afa46840b | 58 | |
Kojto | 110:165afa46840b | 59 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 60 | /** |
Kojto | 110:165afa46840b | 61 | * @brief DSI Init Structure definition |
Kojto | 110:165afa46840b | 62 | */ |
Kojto | 110:165afa46840b | 63 | typedef struct |
Kojto | 110:165afa46840b | 64 | { |
Kojto | 110:165afa46840b | 65 | uint32_t AutomaticClockLaneControl; /*!< Automatic clock lane control |
Kojto | 110:165afa46840b | 66 | This parameter can be any value of @ref DSI_Automatic_Clk_Lane_Control */ |
Kojto | 110:165afa46840b | 67 | |
Kojto | 110:165afa46840b | 68 | uint32_t TXEscapeCkdiv; /*!< TX Escape clock division |
Kojto | 110:165afa46840b | 69 | The values 0 and 1 stop the TX_ESC clock generation */ |
Kojto | 110:165afa46840b | 70 | |
Kojto | 110:165afa46840b | 71 | uint32_t NumberOfLanes; /*!< Number of lanes |
Kojto | 110:165afa46840b | 72 | This parameter can be any value of @ref DSI_Number_Of_Lanes */ |
Kojto | 110:165afa46840b | 73 | |
Kojto | 110:165afa46840b | 74 | }DSI_InitTypeDef; |
Kojto | 110:165afa46840b | 75 | |
Kojto | 110:165afa46840b | 76 | /** |
Kojto | 110:165afa46840b | 77 | * @brief DSI PLL Clock structure definition |
Kojto | 110:165afa46840b | 78 | */ |
Kojto | 110:165afa46840b | 79 | typedef struct |
Kojto | 110:165afa46840b | 80 | { |
Kojto | 110:165afa46840b | 81 | uint32_t PLLNDIV; /*!< PLL Loop Division Factor |
Kojto | 110:165afa46840b | 82 | This parameter must be a value between 10 and 125 */ |
Kojto | 110:165afa46840b | 83 | |
Kojto | 110:165afa46840b | 84 | uint32_t PLLIDF; /*!< PLL Input Division Factor |
Kojto | 110:165afa46840b | 85 | This parameter can be any value of @ref DSI_PLL_IDF */ |
Kojto | 110:165afa46840b | 86 | |
Kojto | 110:165afa46840b | 87 | uint32_t PLLODF; /*!< PLL Output Division Factor |
Kojto | 110:165afa46840b | 88 | This parameter can be any value of @ref DSI_PLL_ODF */ |
Kojto | 110:165afa46840b | 89 | |
Kojto | 110:165afa46840b | 90 | }DSI_PLLInitTypeDef; |
Kojto | 110:165afa46840b | 91 | |
Kojto | 110:165afa46840b | 92 | /** |
Kojto | 110:165afa46840b | 93 | * @brief DSI Video mode configuration |
Kojto | 110:165afa46840b | 94 | */ |
Kojto | 110:165afa46840b | 95 | typedef struct |
Kojto | 110:165afa46840b | 96 | { |
Kojto | 110:165afa46840b | 97 | uint32_t VirtualChannelID; /*!< Virtual channel ID */ |
Kojto | 110:165afa46840b | 98 | |
Kojto | 110:165afa46840b | 99 | uint32_t ColorCoding; /*!< Color coding for LTDC interface |
Kojto | 110:165afa46840b | 100 | This parameter can be any value of @ref DSI_Color_Coding */ |
Kojto | 110:165afa46840b | 101 | |
Kojto | 110:165afa46840b | 102 | uint32_t LooselyPacked; /*!< Enable or disable loosely packed stream (needed only when using |
Kojto | 110:165afa46840b | 103 | 18-bit configuration). |
Kojto | 110:165afa46840b | 104 | This parameter can be any value of @ref DSI_LooselyPacked */ |
Kojto | 110:165afa46840b | 105 | |
Kojto | 110:165afa46840b | 106 | uint32_t Mode; /*!< Video mode type |
Kojto | 110:165afa46840b | 107 | This parameter can be any value of @ref DSI_Video_Mode_Type */ |
Kojto | 110:165afa46840b | 108 | |
Kojto | 110:165afa46840b | 109 | uint32_t PacketSize; /*!< Video packet size */ |
Kojto | 110:165afa46840b | 110 | |
Kojto | 110:165afa46840b | 111 | uint32_t NumberOfChunks; /*!< Number of chunks */ |
Kojto | 110:165afa46840b | 112 | |
Kojto | 110:165afa46840b | 113 | uint32_t NullPacketSize; /*!< Null packet size */ |
Kojto | 110:165afa46840b | 114 | |
Kojto | 110:165afa46840b | 115 | uint32_t HSPolarity; /*!< HSYNC pin polarity |
Kojto | 110:165afa46840b | 116 | This parameter can be any value of @ref DSI_HSYNC_Polarity */ |
Kojto | 110:165afa46840b | 117 | |
Kojto | 110:165afa46840b | 118 | uint32_t VSPolarity; /*!< VSYNC pin polarity |
Kojto | 110:165afa46840b | 119 | This parameter can be any value of @ref DSI_VSYNC_Polarity */ |
Kojto | 110:165afa46840b | 120 | |
Kojto | 110:165afa46840b | 121 | uint32_t DEPolarity; /*!< Data Enable pin polarity |
Kojto | 110:165afa46840b | 122 | This parameter can be any value of @ref DSI_DATA_ENABLE_Polarity */ |
Kojto | 110:165afa46840b | 123 | |
Kojto | 110:165afa46840b | 124 | uint32_t HorizontalSyncActive; /*!< Horizontal synchronism active duration (in lane byte clock cycles) */ |
Kojto | 110:165afa46840b | 125 | |
Kojto | 110:165afa46840b | 126 | uint32_t HorizontalBackPorch; /*!< Horizontal back-porch duration (in lane byte clock cycles) */ |
Kojto | 110:165afa46840b | 127 | |
Kojto | 110:165afa46840b | 128 | uint32_t HorizontalLine; /*!< Horizontal line duration (in lane byte clock cycles) */ |
Kojto | 110:165afa46840b | 129 | |
Kojto | 110:165afa46840b | 130 | uint32_t VerticalSyncActive; /*!< Vertical synchronism active duration */ |
Kojto | 110:165afa46840b | 131 | |
Kojto | 110:165afa46840b | 132 | uint32_t VerticalBackPorch; /*!< Vertical back-porch duration */ |
Kojto | 110:165afa46840b | 133 | |
Kojto | 110:165afa46840b | 134 | uint32_t VerticalFrontPorch; /*!< Vertical front-porch duration */ |
Kojto | 110:165afa46840b | 135 | |
Kojto | 110:165afa46840b | 136 | uint32_t VerticalActive; /*!< Vertical active duration */ |
Kojto | 110:165afa46840b | 137 | |
Kojto | 110:165afa46840b | 138 | uint32_t LPCommandEnable; /*!< Low-power command enable |
Kojto | 110:165afa46840b | 139 | This parameter can be any value of @ref DSI_LP_Command */ |
Kojto | 110:165afa46840b | 140 | |
Kojto | 110:165afa46840b | 141 | uint32_t LPLargestPacketSize; /*!< The size, in bytes, of the low power largest packet that |
Kojto | 110:165afa46840b | 142 | can fit in a line during VSA, VBP and VFP regions */ |
Kojto | 110:165afa46840b | 143 | |
Kojto | 110:165afa46840b | 144 | uint32_t LPVACTLargestPacketSize; /*!< The size, in bytes, of the low power largest packet that |
Kojto | 110:165afa46840b | 145 | can fit in a line during VACT region */ |
Kojto | 110:165afa46840b | 146 | |
Kojto | 110:165afa46840b | 147 | uint32_t LPHorizontalFrontPorchEnable; /*!< Low-power horizontal front-porch enable |
Kojto | 110:165afa46840b | 148 | This parameter can be any value of @ref DSI_LP_HFP */ |
Kojto | 110:165afa46840b | 149 | |
Kojto | 110:165afa46840b | 150 | uint32_t LPHorizontalBackPorchEnable; /*!< Low-power horizontal back-porch enable |
Kojto | 110:165afa46840b | 151 | This parameter can be any value of @ref DSI_LP_HBP */ |
Kojto | 110:165afa46840b | 152 | |
Kojto | 110:165afa46840b | 153 | uint32_t LPVerticalActiveEnable; /*!< Low-power vertical active enable |
Kojto | 110:165afa46840b | 154 | This parameter can be any value of @ref DSI_LP_VACT */ |
Kojto | 110:165afa46840b | 155 | |
Kojto | 110:165afa46840b | 156 | uint32_t LPVerticalFrontPorchEnable; /*!< Low-power vertical front-porch enable |
Kojto | 110:165afa46840b | 157 | This parameter can be any value of @ref DSI_LP_VFP */ |
Kojto | 110:165afa46840b | 158 | |
Kojto | 110:165afa46840b | 159 | uint32_t LPVerticalBackPorchEnable; /*!< Low-power vertical back-porch enable |
Kojto | 110:165afa46840b | 160 | This parameter can be any value of @ref DSI_LP_VBP */ |
Kojto | 110:165afa46840b | 161 | |
Kojto | 110:165afa46840b | 162 | uint32_t LPVerticalSyncActiveEnable; /*!< Low-power vertical sync active enable |
Kojto | 110:165afa46840b | 163 | This parameter can be any value of @ref DSI_LP_VSYNC */ |
Kojto | 110:165afa46840b | 164 | |
Kojto | 110:165afa46840b | 165 | uint32_t FrameBTAAcknowledgeEnable; /*!< Frame bus-turn-around acknowledge enable |
Kojto | 110:165afa46840b | 166 | This parameter can be any value of @ref DSI_FBTA_acknowledge */ |
Kojto | 110:165afa46840b | 167 | |
Kojto | 110:165afa46840b | 168 | }DSI_VidCfgTypeDef; |
Kojto | 110:165afa46840b | 169 | |
Kojto | 110:165afa46840b | 170 | /** |
Kojto | 110:165afa46840b | 171 | * @brief DSI Adapted command mode configuration |
Kojto | 110:165afa46840b | 172 | */ |
Kojto | 110:165afa46840b | 173 | typedef struct |
Kojto | 110:165afa46840b | 174 | { |
Kojto | 110:165afa46840b | 175 | uint32_t VirtualChannelID; /*!< Virtual channel ID */ |
Kojto | 110:165afa46840b | 176 | |
Kojto | 110:165afa46840b | 177 | uint32_t ColorCoding; /*!< Color coding for LTDC interface |
Kojto | 110:165afa46840b | 178 | This parameter can be any value of @ref DSI_Color_Coding */ |
Kojto | 110:165afa46840b | 179 | |
Kojto | 110:165afa46840b | 180 | uint32_t CommandSize; /*!< Maximum allowed size for an LTDC write memory command, measured in |
Kojto | 110:165afa46840b | 181 | pixels. This parameter can be any value between 0x00 and 0xFFFF */ |
Kojto | 110:165afa46840b | 182 | |
Kojto | 110:165afa46840b | 183 | uint32_t TearingEffectSource; /*!< Tearing effect source |
Kojto | 110:165afa46840b | 184 | This parameter can be any value of @ref DSI_TearingEffectSource */ |
Kojto | 110:165afa46840b | 185 | |
Kojto | 110:165afa46840b | 186 | uint32_t TearingEffectPolarity; /*!< Tearing effect pin polarity |
Kojto | 110:165afa46840b | 187 | This parameter can be any value of @ref DSI_TearingEffectPolarity */ |
Kojto | 110:165afa46840b | 188 | |
Kojto | 110:165afa46840b | 189 | uint32_t HSPolarity; /*!< HSYNC pin polarity |
Kojto | 110:165afa46840b | 190 | This parameter can be any value of @ref DSI_HSYNC_Polarity */ |
Kojto | 110:165afa46840b | 191 | |
Kojto | 110:165afa46840b | 192 | uint32_t VSPolarity; /*!< VSYNC pin polarity |
Kojto | 110:165afa46840b | 193 | This parameter can be any value of @ref DSI_VSYNC_Polarity */ |
Kojto | 110:165afa46840b | 194 | |
Kojto | 110:165afa46840b | 195 | uint32_t DEPolarity; /*!< Data Enable pin polarity |
Kojto | 110:165afa46840b | 196 | This parameter can be any value of @ref DSI_DATA_ENABLE_Polarity */ |
Kojto | 110:165afa46840b | 197 | |
Kojto | 110:165afa46840b | 198 | uint32_t VSyncPol; /*!< VSync edge on which the LTDC is halted |
Kojto | 110:165afa46840b | 199 | This parameter can be any value of @ref DSI_Vsync_Polarity */ |
Kojto | 110:165afa46840b | 200 | |
Kojto | 110:165afa46840b | 201 | uint32_t AutomaticRefresh; /*!< Automatic refresh mode |
Kojto | 110:165afa46840b | 202 | This parameter can be any value of @ref DSI_AutomaticRefresh */ |
Kojto | 110:165afa46840b | 203 | |
Kojto | 110:165afa46840b | 204 | uint32_t TEAcknowledgeRequest; /*!< Tearing Effect Acknowledge Request Enable |
Kojto | 110:165afa46840b | 205 | This parameter can be any value of @ref DSI_TE_AcknowledgeRequest */ |
Kojto | 110:165afa46840b | 206 | |
Kojto | 110:165afa46840b | 207 | }DSI_CmdCfgTypeDef; |
Kojto | 110:165afa46840b | 208 | |
Kojto | 110:165afa46840b | 209 | /** |
Kojto | 110:165afa46840b | 210 | * @brief DSI command transmission mode configuration |
Kojto | 110:165afa46840b | 211 | */ |
Kojto | 110:165afa46840b | 212 | typedef struct |
Kojto | 110:165afa46840b | 213 | { |
Kojto | 110:165afa46840b | 214 | uint32_t LPGenShortWriteNoP; /*!< Generic Short Write Zero parameters Transmission |
Kojto | 110:165afa46840b | 215 | This parameter can be any value of @ref DSI_LP_LPGenShortWriteNoP */ |
Kojto | 110:165afa46840b | 216 | |
Kojto | 110:165afa46840b | 217 | uint32_t LPGenShortWriteOneP; /*!< Generic Short Write One parameter Transmission |
Kojto | 110:165afa46840b | 218 | This parameter can be any value of @ref DSI_LP_LPGenShortWriteOneP */ |
Kojto | 110:165afa46840b | 219 | |
Kojto | 110:165afa46840b | 220 | uint32_t LPGenShortWriteTwoP; /*!< Generic Short Write Two parameters Transmission |
Kojto | 110:165afa46840b | 221 | This parameter can be any value of @ref DSI_LP_LPGenShortWriteTwoP */ |
Kojto | 110:165afa46840b | 222 | |
Kojto | 110:165afa46840b | 223 | uint32_t LPGenShortReadNoP; /*!< Generic Short Read Zero parameters Transmission |
Kojto | 110:165afa46840b | 224 | This parameter can be any value of @ref DSI_LP_LPGenShortReadNoP */ |
Kojto | 110:165afa46840b | 225 | |
Kojto | 110:165afa46840b | 226 | uint32_t LPGenShortReadOneP; /*!< Generic Short Read One parameter Transmission |
Kojto | 110:165afa46840b | 227 | This parameter can be any value of @ref DSI_LP_LPGenShortReadOneP */ |
Kojto | 110:165afa46840b | 228 | |
Kojto | 110:165afa46840b | 229 | uint32_t LPGenShortReadTwoP; /*!< Generic Short Read Two parameters Transmission |
Kojto | 110:165afa46840b | 230 | This parameter can be any value of @ref DSI_LP_LPGenShortReadTwoP */ |
Kojto | 110:165afa46840b | 231 | |
Kojto | 110:165afa46840b | 232 | uint32_t LPGenLongWrite; /*!< Generic Long Write Transmission |
Kojto | 110:165afa46840b | 233 | This parameter can be any value of @ref DSI_LP_LPGenLongWrite */ |
Kojto | 110:165afa46840b | 234 | |
Kojto | 110:165afa46840b | 235 | uint32_t LPDcsShortWriteNoP; /*!< DCS Short Write Zero parameters Transmission |
Kojto | 110:165afa46840b | 236 | This parameter can be any value of @ref DSI_LP_LPDcsShortWriteNoP */ |
Kojto | 110:165afa46840b | 237 | |
Kojto | 110:165afa46840b | 238 | uint32_t LPDcsShortWriteOneP; /*!< DCS Short Write One parameter Transmission |
Kojto | 110:165afa46840b | 239 | This parameter can be any value of @ref DSI_LP_LPDcsShortWriteOneP */ |
Kojto | 110:165afa46840b | 240 | |
Kojto | 110:165afa46840b | 241 | uint32_t LPDcsShortReadNoP; /*!< DCS Short Read Zero parameters Transmission |
Kojto | 110:165afa46840b | 242 | This parameter can be any value of @ref DSI_LP_LPDcsShortReadNoP */ |
Kojto | 110:165afa46840b | 243 | |
Kojto | 110:165afa46840b | 244 | uint32_t LPDcsLongWrite; /*!< DCS Long Write Transmission |
Kojto | 110:165afa46840b | 245 | This parameter can be any value of @ref DSI_LP_LPDcsLongWrite */ |
Kojto | 110:165afa46840b | 246 | |
Kojto | 110:165afa46840b | 247 | uint32_t LPMaxReadPacket; /*!< Maximum Read Packet Size Transmission |
Kojto | 110:165afa46840b | 248 | This parameter can be any value of @ref DSI_LP_LPMaxReadPacket */ |
Kojto | 110:165afa46840b | 249 | |
Kojto | 110:165afa46840b | 250 | uint32_t AcknowledgeRequest; /*!< Acknowledge Request Enable |
Kojto | 110:165afa46840b | 251 | This parameter can be any value of @ref DSI_AcknowledgeRequest */ |
Kojto | 110:165afa46840b | 252 | |
Kojto | 110:165afa46840b | 253 | }DSI_LPCmdTypeDef; |
Kojto | 110:165afa46840b | 254 | |
Kojto | 110:165afa46840b | 255 | /** |
Kojto | 110:165afa46840b | 256 | * @brief DSI PHY Timings definition |
Kojto | 110:165afa46840b | 257 | */ |
Kojto | 110:165afa46840b | 258 | typedef struct |
Kojto | 110:165afa46840b | 259 | { |
Kojto | 110:165afa46840b | 260 | uint32_t ClockLaneHS2LPTime; /*!< The maximum time that the D-PHY clock lane takes to go from high-speed |
Kojto | 110:165afa46840b | 261 | to low-power transmission */ |
Kojto | 110:165afa46840b | 262 | |
Kojto | 110:165afa46840b | 263 | uint32_t ClockLaneLP2HSTime; /*!< The maximum time that the D-PHY clock lane takes to go from low-power |
Kojto | 110:165afa46840b | 264 | to high-speed transmission */ |
Kojto | 110:165afa46840b | 265 | |
Kojto | 110:165afa46840b | 266 | uint32_t DataLaneHS2LPTime; /*!< The maximum time that the D-PHY data lanes takes to go from high-speed |
Kojto | 110:165afa46840b | 267 | to low-power transmission */ |
Kojto | 110:165afa46840b | 268 | |
Kojto | 110:165afa46840b | 269 | uint32_t DataLaneLP2HSTime; /*!< The maximum time that the D-PHY data lanes takes to go from low-power |
Kojto | 110:165afa46840b | 270 | to high-speed transmission */ |
Kojto | 110:165afa46840b | 271 | |
Kojto | 110:165afa46840b | 272 | uint32_t DataLaneMaxReadTime; /*!< The maximum time required to perform a read command */ |
Kojto | 110:165afa46840b | 273 | |
Kojto | 110:165afa46840b | 274 | uint32_t StopWaitTime; /*!< The minimum wait period to request a High-Speed transmission after the |
Kojto | 110:165afa46840b | 275 | Stop state */ |
Kojto | 110:165afa46840b | 276 | |
Kojto | 110:165afa46840b | 277 | }DSI_PHY_TimerTypeDef; |
Kojto | 110:165afa46840b | 278 | |
Kojto | 110:165afa46840b | 279 | /** |
Kojto | 110:165afa46840b | 280 | * @brief DSI HOST Timeouts definition |
Kojto | 110:165afa46840b | 281 | */ |
Kojto | 110:165afa46840b | 282 | typedef struct |
Kojto | 110:165afa46840b | 283 | { |
Kojto | 110:165afa46840b | 284 | uint32_t TimeoutCkdiv; /*!< Time-out clock division */ |
Kojto | 110:165afa46840b | 285 | |
Kojto | 110:165afa46840b | 286 | uint32_t HighSpeedTransmissionTimeout; /*!< High-speed transmission time-out */ |
Kojto | 110:165afa46840b | 287 | |
Kojto | 110:165afa46840b | 288 | uint32_t LowPowerReceptionTimeout; /*!< Low-power reception time-out */ |
Kojto | 110:165afa46840b | 289 | |
Kojto | 110:165afa46840b | 290 | uint32_t HighSpeedReadTimeout; /*!< High-speed read time-out */ |
Kojto | 110:165afa46840b | 291 | |
Kojto | 110:165afa46840b | 292 | uint32_t LowPowerReadTimeout; /*!< Low-power read time-out */ |
Kojto | 110:165afa46840b | 293 | |
Kojto | 110:165afa46840b | 294 | uint32_t HighSpeedWriteTimeout; /*!< High-speed write time-out */ |
Kojto | 110:165afa46840b | 295 | |
Kojto | 110:165afa46840b | 296 | uint32_t HighSpeedWritePrespMode; /*!< High-speed write presp mode |
Kojto | 110:165afa46840b | 297 | This parameter can be any value of @ref DSI_HS_PrespMode */ |
Kojto | 110:165afa46840b | 298 | |
Kojto | 110:165afa46840b | 299 | uint32_t LowPowerWriteTimeout; /*!< Low-speed write time-out */ |
Kojto | 110:165afa46840b | 300 | |
Kojto | 110:165afa46840b | 301 | uint32_t BTATimeout; /*!< BTA time-out */ |
Kojto | 110:165afa46840b | 302 | |
Kojto | 110:165afa46840b | 303 | }DSI_HOST_TimeoutTypeDef; |
Kojto | 110:165afa46840b | 304 | |
Kojto | 110:165afa46840b | 305 | /** |
Kojto | 110:165afa46840b | 306 | * @brief DSI States Structure definition |
Kojto | 110:165afa46840b | 307 | */ |
Kojto | 110:165afa46840b | 308 | typedef enum |
Kojto | 110:165afa46840b | 309 | { |
Kojto | 110:165afa46840b | 310 | HAL_DSI_STATE_RESET = 0x00, |
Kojto | 110:165afa46840b | 311 | HAL_DSI_STATE_READY = 0x01, |
Kojto | 110:165afa46840b | 312 | HAL_DSI_STATE_ERROR = 0x02, |
Kojto | 110:165afa46840b | 313 | HAL_DSI_STATE_BUSY = 0x03, |
Kojto | 110:165afa46840b | 314 | HAL_DSI_STATE_TIMEOUT = 0x04 |
Kojto | 110:165afa46840b | 315 | }HAL_DSI_StateTypeDef; |
Kojto | 110:165afa46840b | 316 | |
Kojto | 110:165afa46840b | 317 | /** |
Kojto | 110:165afa46840b | 318 | * @brief DSI Handle Structure definition |
Kojto | 110:165afa46840b | 319 | */ |
Kojto | 110:165afa46840b | 320 | typedef struct |
Kojto | 110:165afa46840b | 321 | { |
Kojto | 110:165afa46840b | 322 | DSI_TypeDef *Instance; /*!< Register base address */ |
Kojto | 110:165afa46840b | 323 | DSI_InitTypeDef Init; /*!< DSI required parameters */ |
Kojto | 110:165afa46840b | 324 | HAL_LockTypeDef Lock; /*!< DSI peripheral status */ |
Kojto | 110:165afa46840b | 325 | __IO HAL_DSI_StateTypeDef State; /*!< DSI communication state */ |
Kojto | 110:165afa46840b | 326 | __IO uint32_t ErrorCode; /*!< DSI Error code */ |
Kojto | 110:165afa46840b | 327 | uint32_t ErrorMsk; /*!< DSI Error monitoring mask */ |
Kojto | 110:165afa46840b | 328 | }DSI_HandleTypeDef; |
Kojto | 110:165afa46840b | 329 | |
Kojto | 110:165afa46840b | 330 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 331 | /** @defgroup DSI_DCS_Command DSI DCS Command |
Kojto | 110:165afa46840b | 332 | * @{ |
Kojto | 110:165afa46840b | 333 | */ |
Kojto | 110:165afa46840b | 334 | #define DSI_ENTER_IDLE_MODE 0x39 |
Kojto | 110:165afa46840b | 335 | #define DSI_ENTER_INVERT_MODE 0x21 |
Kojto | 110:165afa46840b | 336 | #define DSI_ENTER_NORMAL_MODE 0x13 |
Kojto | 110:165afa46840b | 337 | #define DSI_ENTER_PARTIAL_MODE 0x12 |
Kojto | 110:165afa46840b | 338 | #define DSI_ENTER_SLEEP_MODE 0x10 |
Kojto | 110:165afa46840b | 339 | #define DSI_EXIT_IDLE_MODE 0x38 |
Kojto | 110:165afa46840b | 340 | #define DSI_EXIT_INVERT_MODE 0x20 |
Kojto | 110:165afa46840b | 341 | #define DSI_EXIT_SLEEP_MODE 0x11 |
Kojto | 110:165afa46840b | 342 | #define DSI_GET_3D_CONTROL 0x3F |
Kojto | 110:165afa46840b | 343 | #define DSI_GET_ADDRESS_MODE 0x0B |
Kojto | 110:165afa46840b | 344 | #define DSI_GET_BLUE_CHANNEL 0x08 |
Kojto | 110:165afa46840b | 345 | #define DSI_GET_DIAGNOSTIC_RESULT 0x0F |
Kojto | 110:165afa46840b | 346 | #define DSI_GET_DISPLAY_MODE 0x0D |
Kojto | 110:165afa46840b | 347 | #define DSI_GET_GREEN_CHANNEL 0x07 |
Kojto | 110:165afa46840b | 348 | #define DSI_GET_PIXEL_FORMAT 0x0C |
Kojto | 110:165afa46840b | 349 | #define DSI_GET_POWER_MODE 0x0A |
Kojto | 110:165afa46840b | 350 | #define DSI_GET_RED_CHANNEL 0x06 |
Kojto | 110:165afa46840b | 351 | #define DSI_GET_SCANLINE 0x45 |
Kojto | 110:165afa46840b | 352 | #define DSI_GET_SIGNAL_MODE 0x0E |
Kojto | 110:165afa46840b | 353 | #define DSI_NOP 0x00 |
Kojto | 110:165afa46840b | 354 | #define DSI_READ_DDB_CONTINUE 0xA8 |
Kojto | 110:165afa46840b | 355 | #define DSI_READ_DDB_START 0xA1 |
Kojto | 110:165afa46840b | 356 | #define DSI_READ_MEMORY_CONTINUE 0x3E |
Kojto | 110:165afa46840b | 357 | #define DSI_READ_MEMORY_START 0x2E |
Kojto | 110:165afa46840b | 358 | #define DSI_SET_3D_CONTROL 0x3D |
Kojto | 110:165afa46840b | 359 | #define DSI_SET_ADDRESS_MODE 0x36 |
Kojto | 110:165afa46840b | 360 | #define DSI_SET_COLUMN_ADDRESS 0x2A |
Kojto | 110:165afa46840b | 361 | #define DSI_SET_DISPLAY_OFF 0x28 |
Kojto | 110:165afa46840b | 362 | #define DSI_SET_DISPLAY_ON 0x29 |
Kojto | 110:165afa46840b | 363 | #define DSI_SET_GAMMA_CURVE 0x26 |
Kojto | 110:165afa46840b | 364 | #define DSI_SET_PAGE_ADDRESS 0x2B |
Kojto | 110:165afa46840b | 365 | #define DSI_SET_PARTIAL_COLUMNS 0x31 |
Kojto | 110:165afa46840b | 366 | #define DSI_SET_PARTIAL_ROWS 0x30 |
Kojto | 110:165afa46840b | 367 | #define DSI_SET_PIXEL_FORMAT 0x3A |
Kojto | 110:165afa46840b | 368 | #define DSI_SET_SCROLL_AREA 0x33 |
Kojto | 110:165afa46840b | 369 | #define DSI_SET_SCROLL_START 0x37 |
Kojto | 110:165afa46840b | 370 | #define DSI_SET_TEAR_OFF 0x34 |
Kojto | 110:165afa46840b | 371 | #define DSI_SET_TEAR_ON 0x35 |
Kojto | 110:165afa46840b | 372 | #define DSI_SET_TEAR_SCANLINE 0x44 |
Kojto | 110:165afa46840b | 373 | #define DSI_SET_VSYNC_TIMING 0x40 |
Kojto | 110:165afa46840b | 374 | #define DSI_SOFT_RESET 0x01 |
Kojto | 110:165afa46840b | 375 | #define DSI_WRITE_LUT 0x2D |
Kojto | 110:165afa46840b | 376 | #define DSI_WRITE_MEMORY_CONTINUE 0x3C |
Kojto | 110:165afa46840b | 377 | #define DSI_WRITE_MEMORY_START 0x2C |
Kojto | 110:165afa46840b | 378 | /** |
Kojto | 110:165afa46840b | 379 | * @} |
Kojto | 110:165afa46840b | 380 | */ |
Kojto | 110:165afa46840b | 381 | |
Kojto | 110:165afa46840b | 382 | /** @defgroup DSI_Video_Mode_Type DSI Video Mode Type |
Kojto | 110:165afa46840b | 383 | * @{ |
Kojto | 110:165afa46840b | 384 | */ |
Kojto | 110:165afa46840b | 385 | #define DSI_VID_MODE_NB_PULSES 0 |
Kojto | 110:165afa46840b | 386 | #define DSI_VID_MODE_NB_EVENTS 1 |
Kojto | 110:165afa46840b | 387 | #define DSI_VID_MODE_BURST 2 |
Kojto | 110:165afa46840b | 388 | /** |
Kojto | 110:165afa46840b | 389 | * @} |
Kojto | 110:165afa46840b | 390 | */ |
Kojto | 110:165afa46840b | 391 | |
Kojto | 110:165afa46840b | 392 | /** @defgroup DSI_Color_Mode DSI Color Mode |
Kojto | 110:165afa46840b | 393 | * @{ |
Kojto | 110:165afa46840b | 394 | */ |
Kojto | 110:165afa46840b | 395 | #define DSI_COLOR_MODE_FULL 0 |
Kojto | 110:165afa46840b | 396 | #define DSI_COLOR_MODE_EIGHT DSI_WCR_COLM |
Kojto | 110:165afa46840b | 397 | /** |
Kojto | 110:165afa46840b | 398 | * @} |
Kojto | 110:165afa46840b | 399 | */ |
Kojto | 110:165afa46840b | 400 | |
Kojto | 110:165afa46840b | 401 | /** @defgroup DSI_ShutDown DSI ShutDown |
Kojto | 110:165afa46840b | 402 | * @{ |
Kojto | 110:165afa46840b | 403 | */ |
Kojto | 110:165afa46840b | 404 | #define DSI_DISPLAY_ON 0 |
Kojto | 110:165afa46840b | 405 | #define DSI_DISPLAY_OFF DSI_WCR_SHTDN |
Kojto | 110:165afa46840b | 406 | /** |
Kojto | 110:165afa46840b | 407 | * @} |
Kojto | 110:165afa46840b | 408 | */ |
Kojto | 110:165afa46840b | 409 | |
Kojto | 110:165afa46840b | 410 | /** @defgroup DSI_LP_Command DSI LP Command |
Kojto | 110:165afa46840b | 411 | * @{ |
Kojto | 110:165afa46840b | 412 | */ |
Kojto | 110:165afa46840b | 413 | #define DSI_LP_COMMAND_DISABLE 0 |
Kojto | 110:165afa46840b | 414 | #define DSI_LP_COMMAND_ENABLE DSI_VMCR_LPCE |
Kojto | 110:165afa46840b | 415 | /** |
Kojto | 110:165afa46840b | 416 | * @} |
Kojto | 110:165afa46840b | 417 | */ |
Kojto | 110:165afa46840b | 418 | |
Kojto | 110:165afa46840b | 419 | /** @defgroup DSI_LP_HFP DSI LP HFP |
Kojto | 110:165afa46840b | 420 | * @{ |
Kojto | 110:165afa46840b | 421 | */ |
Kojto | 110:165afa46840b | 422 | #define DSI_LP_HFP_DISABLE 0 |
Kojto | 110:165afa46840b | 423 | #define DSI_LP_HFP_ENABLE DSI_VMCR_LPHFPE |
Kojto | 110:165afa46840b | 424 | /** |
Kojto | 110:165afa46840b | 425 | * @} |
Kojto | 110:165afa46840b | 426 | */ |
Kojto | 110:165afa46840b | 427 | |
Kojto | 110:165afa46840b | 428 | /** @defgroup DSI_LP_HBP DSI LP HBP |
Kojto | 110:165afa46840b | 429 | * @{ |
Kojto | 110:165afa46840b | 430 | */ |
Kojto | 110:165afa46840b | 431 | #define DSI_LP_HBP_DISABLE 0 |
Kojto | 110:165afa46840b | 432 | #define DSI_LP_HBP_ENABLE DSI_VMCR_LPHBPE |
Kojto | 110:165afa46840b | 433 | /** |
Kojto | 110:165afa46840b | 434 | * @} |
Kojto | 110:165afa46840b | 435 | */ |
Kojto | 110:165afa46840b | 436 | |
Kojto | 110:165afa46840b | 437 | /** @defgroup DSI_LP_VACT DSI LP VACT |
Kojto | 110:165afa46840b | 438 | * @{ |
Kojto | 110:165afa46840b | 439 | */ |
Kojto | 110:165afa46840b | 440 | #define DSI_LP_VACT_DISABLE 0 |
Kojto | 110:165afa46840b | 441 | #define DSI_LP_VACT_ENABLE DSI_VMCR_LPVAE |
Kojto | 110:165afa46840b | 442 | /** |
Kojto | 110:165afa46840b | 443 | * @} |
Kojto | 110:165afa46840b | 444 | */ |
Kojto | 110:165afa46840b | 445 | |
Kojto | 110:165afa46840b | 446 | /** @defgroup DSI_LP_VFP DSI LP VFP |
Kojto | 110:165afa46840b | 447 | * @{ |
Kojto | 110:165afa46840b | 448 | */ |
Kojto | 110:165afa46840b | 449 | #define DSI_LP_VFP_DISABLE 0 |
Kojto | 110:165afa46840b | 450 | #define DSI_LP_VFP_ENABLE DSI_VMCR_LPVFPE |
Kojto | 110:165afa46840b | 451 | /** |
Kojto | 110:165afa46840b | 452 | * @} |
Kojto | 110:165afa46840b | 453 | */ |
Kojto | 110:165afa46840b | 454 | |
Kojto | 110:165afa46840b | 455 | /** @defgroup DSI_LP_VBP DSI LP VBP |
Kojto | 110:165afa46840b | 456 | * @{ |
Kojto | 110:165afa46840b | 457 | */ |
Kojto | 110:165afa46840b | 458 | #define DSI_LP_VBP_DISABLE 0 |
Kojto | 110:165afa46840b | 459 | #define DSI_LP_VBP_ENABLE DSI_VMCR_LPVBPE |
Kojto | 110:165afa46840b | 460 | /** |
Kojto | 110:165afa46840b | 461 | * @} |
Kojto | 110:165afa46840b | 462 | */ |
Kojto | 110:165afa46840b | 463 | |
Kojto | 110:165afa46840b | 464 | /** @defgroup DSI_LP_VSYNC DSI LP VSYNC |
Kojto | 110:165afa46840b | 465 | * @{ |
Kojto | 110:165afa46840b | 466 | */ |
Kojto | 110:165afa46840b | 467 | #define DSI_LP_VSYNC_DISABLE 0 |
Kojto | 110:165afa46840b | 468 | #define DSI_LP_VSYNC_ENABLE DSI_VMCR_LPVSAE |
Kojto | 110:165afa46840b | 469 | /** |
Kojto | 110:165afa46840b | 470 | * @} |
Kojto | 110:165afa46840b | 471 | */ |
Kojto | 110:165afa46840b | 472 | |
Kojto | 110:165afa46840b | 473 | /** @defgroup DSI_FBTA_acknowledge DSI FBTA Acknowledge |
Kojto | 110:165afa46840b | 474 | * @{ |
Kojto | 110:165afa46840b | 475 | */ |
Kojto | 110:165afa46840b | 476 | #define DSI_FBTAA_DISABLE 0 |
Kojto | 110:165afa46840b | 477 | #define DSI_FBTAA_ENABLE DSI_VMCR_FBTAAE |
Kojto | 110:165afa46840b | 478 | /** |
Kojto | 110:165afa46840b | 479 | * @} |
Kojto | 110:165afa46840b | 480 | */ |
Kojto | 110:165afa46840b | 481 | |
Kojto | 110:165afa46840b | 482 | /** @defgroup DSI_TearingEffectSource DSI Tearing Effect Source |
Kojto | 110:165afa46840b | 483 | * @{ |
Kojto | 110:165afa46840b | 484 | */ |
Kojto | 110:165afa46840b | 485 | #define DSI_TE_DSILINK 0 |
Kojto | 110:165afa46840b | 486 | #define DSI_TE_EXTERNAL DSI_WCFGR_TESRC |
Kojto | 110:165afa46840b | 487 | /** |
Kojto | 110:165afa46840b | 488 | * @} |
Kojto | 110:165afa46840b | 489 | */ |
Kojto | 110:165afa46840b | 490 | |
Kojto | 110:165afa46840b | 491 | /** @defgroup DSI_TearingEffectPolarity DSI Tearing Effect Polarity |
Kojto | 110:165afa46840b | 492 | * @{ |
Kojto | 110:165afa46840b | 493 | */ |
Kojto | 110:165afa46840b | 494 | #define DSI_TE_RISING_EDGE 0 |
Kojto | 110:165afa46840b | 495 | #define DSI_TE_FALLING_EDGE DSI_WCFGR_TEPOL |
Kojto | 110:165afa46840b | 496 | /** |
Kojto | 110:165afa46840b | 497 | * @} |
Kojto | 110:165afa46840b | 498 | */ |
Kojto | 110:165afa46840b | 499 | |
Kojto | 110:165afa46840b | 500 | /** @defgroup DSI_Vsync_Polarity DSI Vsync Polarity |
Kojto | 110:165afa46840b | 501 | * @{ |
Kojto | 110:165afa46840b | 502 | */ |
Kojto | 110:165afa46840b | 503 | #define DSI_VSYNC_FALLING 0 |
Kojto | 110:165afa46840b | 504 | #define DSI_VSYNC_RISING DSI_WCFGR_VSPOL |
Kojto | 110:165afa46840b | 505 | /** |
Kojto | 110:165afa46840b | 506 | * @} |
Kojto | 110:165afa46840b | 507 | */ |
Kojto | 110:165afa46840b | 508 | |
Kojto | 110:165afa46840b | 509 | /** @defgroup DSI_AutomaticRefresh DSI Automatic Refresh |
Kojto | 110:165afa46840b | 510 | * @{ |
Kojto | 110:165afa46840b | 511 | */ |
Kojto | 110:165afa46840b | 512 | #define DSI_AR_DISABLE 0 |
Kojto | 110:165afa46840b | 513 | #define DSI_AR_ENABLE DSI_WCFGR_AR |
Kojto | 110:165afa46840b | 514 | /** |
Kojto | 110:165afa46840b | 515 | * @} |
Kojto | 110:165afa46840b | 516 | */ |
Kojto | 110:165afa46840b | 517 | |
Kojto | 110:165afa46840b | 518 | /** @defgroup DSI_TE_AcknowledgeRequest DSI TE Acknowledge Request |
Kojto | 110:165afa46840b | 519 | * @{ |
Kojto | 110:165afa46840b | 520 | */ |
Kojto | 110:165afa46840b | 521 | #define DSI_TE_ACKNOWLEDGE_DISABLE 0 |
Kojto | 110:165afa46840b | 522 | #define DSI_TE_ACKNOWLEDGE_ENABLE DSI_CMCR_TEARE |
Kojto | 110:165afa46840b | 523 | /** |
Kojto | 110:165afa46840b | 524 | * @} |
Kojto | 110:165afa46840b | 525 | */ |
Kojto | 110:165afa46840b | 526 | |
Kojto | 110:165afa46840b | 527 | /** @defgroup DSI_AcknowledgeRequest DSI Acknowledge Request |
Kojto | 110:165afa46840b | 528 | * @{ |
Kojto | 110:165afa46840b | 529 | */ |
Kojto | 110:165afa46840b | 530 | #define DSI_ACKNOWLEDGE_DISABLE 0 |
Kojto | 110:165afa46840b | 531 | #define DSI_ACKNOWLEDGE_ENABLE DSI_CMCR_ARE |
Kojto | 110:165afa46840b | 532 | /** |
Kojto | 110:165afa46840b | 533 | * @} |
Kojto | 110:165afa46840b | 534 | */ |
Kojto | 110:165afa46840b | 535 | |
Kojto | 110:165afa46840b | 536 | /** @defgroup DSI_LP_LPGenShortWriteNoP DSI LP LPGen Short Write NoP |
Kojto | 110:165afa46840b | 537 | * @{ |
Kojto | 110:165afa46840b | 538 | */ |
Kojto | 110:165afa46840b | 539 | #define DSI_LP_GSW0P_DISABLE 0 |
Kojto | 110:165afa46840b | 540 | #define DSI_LP_GSW0P_ENABLE DSI_CMCR_GSW0TX |
Kojto | 110:165afa46840b | 541 | /** |
Kojto | 110:165afa46840b | 542 | * @} |
Kojto | 110:165afa46840b | 543 | */ |
Kojto | 110:165afa46840b | 544 | |
Kojto | 110:165afa46840b | 545 | /** @defgroup DSI_LP_LPGenShortWriteOneP DSI LP LPGen Short Write OneP |
Kojto | 110:165afa46840b | 546 | * @{ |
Kojto | 110:165afa46840b | 547 | */ |
Kojto | 110:165afa46840b | 548 | #define DSI_LP_GSW1P_DISABLE 0 |
Kojto | 110:165afa46840b | 549 | #define DSI_LP_GSW1P_ENABLE DSI_CMCR_GSW1TX |
Kojto | 110:165afa46840b | 550 | /** |
Kojto | 110:165afa46840b | 551 | * @} |
Kojto | 110:165afa46840b | 552 | */ |
Kojto | 110:165afa46840b | 553 | |
Kojto | 110:165afa46840b | 554 | /** @defgroup DSI_LP_LPGenShortWriteTwoP DSI LP LPGen Short Write TwoP |
Kojto | 110:165afa46840b | 555 | * @{ |
Kojto | 110:165afa46840b | 556 | */ |
Kojto | 110:165afa46840b | 557 | #define DSI_LP_GSW2P_DISABLE 0 |
Kojto | 110:165afa46840b | 558 | #define DSI_LP_GSW2P_ENABLE DSI_CMCR_GSW2TX |
Kojto | 110:165afa46840b | 559 | /** |
Kojto | 110:165afa46840b | 560 | * @} |
Kojto | 110:165afa46840b | 561 | */ |
Kojto | 110:165afa46840b | 562 | |
Kojto | 110:165afa46840b | 563 | /** @defgroup DSI_LP_LPGenShortReadNoP DSI LP LPGen Short Read NoP |
Kojto | 110:165afa46840b | 564 | * @{ |
Kojto | 110:165afa46840b | 565 | */ |
Kojto | 110:165afa46840b | 566 | #define DSI_LP_GSR0P_DISABLE 0 |
Kojto | 110:165afa46840b | 567 | #define DSI_LP_GSR0P_ENABLE DSI_CMCR_GSR0TX |
Kojto | 110:165afa46840b | 568 | /** |
Kojto | 110:165afa46840b | 569 | * @} |
Kojto | 110:165afa46840b | 570 | */ |
Kojto | 110:165afa46840b | 571 | |
Kojto | 110:165afa46840b | 572 | /** @defgroup DSI_LP_LPGenShortReadOneP DSI LP LPGen Short Read OneP |
Kojto | 110:165afa46840b | 573 | * @{ |
Kojto | 110:165afa46840b | 574 | */ |
Kojto | 110:165afa46840b | 575 | #define DSI_LP_GSR1P_DISABLE 0 |
Kojto | 110:165afa46840b | 576 | #define DSI_LP_GSR1P_ENABLE DSI_CMCR_GSR1TX |
Kojto | 110:165afa46840b | 577 | /** |
Kojto | 110:165afa46840b | 578 | * @} |
Kojto | 110:165afa46840b | 579 | */ |
Kojto | 110:165afa46840b | 580 | |
Kojto | 110:165afa46840b | 581 | /** @defgroup DSI_LP_LPGenShortReadTwoP DSI LP LPGen Short Read TwoP |
Kojto | 110:165afa46840b | 582 | * @{ |
Kojto | 110:165afa46840b | 583 | */ |
Kojto | 110:165afa46840b | 584 | #define DSI_LP_GSR2P_DISABLE 0 |
Kojto | 110:165afa46840b | 585 | #define DSI_LP_GSR2P_ENABLE DSI_CMCR_GSR2TX |
Kojto | 110:165afa46840b | 586 | /** |
Kojto | 110:165afa46840b | 587 | * @} |
Kojto | 110:165afa46840b | 588 | */ |
Kojto | 110:165afa46840b | 589 | |
Kojto | 110:165afa46840b | 590 | /** @defgroup DSI_LP_LPGenLongWrite DSI LP LPGen LongWrite |
Kojto | 110:165afa46840b | 591 | * @{ |
Kojto | 110:165afa46840b | 592 | */ |
Kojto | 110:165afa46840b | 593 | #define DSI_LP_GLW_DISABLE 0 |
Kojto | 110:165afa46840b | 594 | #define DSI_LP_GLW_ENABLE DSI_CMCR_GLWTX |
Kojto | 110:165afa46840b | 595 | /** |
Kojto | 110:165afa46840b | 596 | * @} |
Kojto | 110:165afa46840b | 597 | */ |
Kojto | 110:165afa46840b | 598 | |
Kojto | 110:165afa46840b | 599 | /** @defgroup DSI_LP_LPDcsShortWriteNoP DSI LP LPDcs Short Write NoP |
Kojto | 110:165afa46840b | 600 | * @{ |
Kojto | 110:165afa46840b | 601 | */ |
Kojto | 110:165afa46840b | 602 | #define DSI_LP_DSW0P_DISABLE 0 |
Kojto | 110:165afa46840b | 603 | #define DSI_LP_DSW0P_ENABLE DSI_CMCR_DSW0TX |
Kojto | 110:165afa46840b | 604 | /** |
Kojto | 110:165afa46840b | 605 | * @} |
Kojto | 110:165afa46840b | 606 | */ |
Kojto | 110:165afa46840b | 607 | |
Kojto | 110:165afa46840b | 608 | /** @defgroup DSI_LP_LPDcsShortWriteOneP DSI LP LPDcs Short Write OneP |
Kojto | 110:165afa46840b | 609 | * @{ |
Kojto | 110:165afa46840b | 610 | */ |
Kojto | 110:165afa46840b | 611 | #define DSI_LP_DSW1P_DISABLE 0 |
Kojto | 110:165afa46840b | 612 | #define DSI_LP_DSW1P_ENABLE DSI_CMCR_DSW1TX |
Kojto | 110:165afa46840b | 613 | /** |
Kojto | 110:165afa46840b | 614 | * @} |
Kojto | 110:165afa46840b | 615 | */ |
Kojto | 110:165afa46840b | 616 | |
Kojto | 110:165afa46840b | 617 | /** @defgroup DSI_LP_LPDcsShortReadNoP DSI LP LPDcs Short Read NoP |
Kojto | 110:165afa46840b | 618 | * @{ |
Kojto | 110:165afa46840b | 619 | */ |
Kojto | 110:165afa46840b | 620 | #define DSI_LP_DSR0P_DISABLE 0 |
Kojto | 110:165afa46840b | 621 | #define DSI_LP_DSR0P_ENABLE DSI_CMCR_DSR0TX |
Kojto | 110:165afa46840b | 622 | /** |
Kojto | 110:165afa46840b | 623 | * @} |
Kojto | 110:165afa46840b | 624 | */ |
Kojto | 110:165afa46840b | 625 | |
Kojto | 110:165afa46840b | 626 | /** @defgroup DSI_LP_LPDcsLongWrite DSI LP LPDcs Long Write |
Kojto | 110:165afa46840b | 627 | * @{ |
Kojto | 110:165afa46840b | 628 | */ |
Kojto | 110:165afa46840b | 629 | #define DSI_LP_DLW_DISABLE 0 |
Kojto | 110:165afa46840b | 630 | #define DSI_LP_DLW_ENABLE DSI_CMCR_DLWTX |
Kojto | 110:165afa46840b | 631 | /** |
Kojto | 110:165afa46840b | 632 | * @} |
Kojto | 110:165afa46840b | 633 | */ |
Kojto | 110:165afa46840b | 634 | |
Kojto | 110:165afa46840b | 635 | /** @defgroup DSI_LP_LPMaxReadPacket DSI LP LPMax Read Packet |
Kojto | 110:165afa46840b | 636 | * @{ |
Kojto | 110:165afa46840b | 637 | */ |
Kojto | 110:165afa46840b | 638 | #define DSI_LP_MRDP_DISABLE 0 |
Kojto | 110:165afa46840b | 639 | #define DSI_LP_MRDP_ENABLE DSI_CMCR_MRDPS |
Kojto | 110:165afa46840b | 640 | /** |
Kojto | 110:165afa46840b | 641 | * @} |
Kojto | 110:165afa46840b | 642 | */ |
Kojto | 110:165afa46840b | 643 | |
Kojto | 110:165afa46840b | 644 | /** @defgroup DSI_HS_PrespMode DSI HS Presp Mode |
Kojto | 110:165afa46840b | 645 | * @{ |
Kojto | 110:165afa46840b | 646 | */ |
Kojto | 110:165afa46840b | 647 | #define DSI_HS_PM_DISABLE 0 |
Kojto | 110:165afa46840b | 648 | #define DSI_HS_PM_ENABLE DSI_TCCR3_PM |
Kojto | 110:165afa46840b | 649 | /** |
Kojto | 110:165afa46840b | 650 | * @} |
Kojto | 110:165afa46840b | 651 | */ |
Kojto | 110:165afa46840b | 652 | |
Kojto | 110:165afa46840b | 653 | |
Kojto | 110:165afa46840b | 654 | /** @defgroup DSI_Automatic_Clk_Lane_Control DSI Automatic Clk Lane Control |
Kojto | 110:165afa46840b | 655 | * @{ |
Kojto | 110:165afa46840b | 656 | */ |
Kojto | 110:165afa46840b | 657 | #define DSI_AUTO_CLK_LANE_CTRL_DISABLE 0 |
Kojto | 110:165afa46840b | 658 | #define DSI_AUTO_CLK_LANE_CTRL_ENABLE DSI_CLCR_ACR |
Kojto | 110:165afa46840b | 659 | /** |
Kojto | 110:165afa46840b | 660 | * @} |
Kojto | 110:165afa46840b | 661 | */ |
Kojto | 110:165afa46840b | 662 | |
Kojto | 110:165afa46840b | 663 | /** @defgroup DSI_Number_Of_Lanes DSI Number Of Lanes |
Kojto | 110:165afa46840b | 664 | * @{ |
Kojto | 110:165afa46840b | 665 | */ |
Kojto | 110:165afa46840b | 666 | #define DSI_ONE_DATA_LANE 0 |
Kojto | 110:165afa46840b | 667 | #define DSI_TWO_DATA_LANES 1 |
Kojto | 110:165afa46840b | 668 | /** |
Kojto | 110:165afa46840b | 669 | * @} |
Kojto | 110:165afa46840b | 670 | */ |
Kojto | 110:165afa46840b | 671 | |
Kojto | 110:165afa46840b | 672 | /** @defgroup DSI_FlowControl DSI Flow Control |
Kojto | 110:165afa46840b | 673 | * @{ |
Kojto | 110:165afa46840b | 674 | */ |
Kojto | 110:165afa46840b | 675 | #define DSI_FLOW_CONTROL_CRC_RX DSI_PCR_CRCRXE |
Kojto | 110:165afa46840b | 676 | #define DSI_FLOW_CONTROL_ECC_RX DSI_PCR_ECCRXE |
Kojto | 110:165afa46840b | 677 | #define DSI_FLOW_CONTROL_BTA DSI_PCR_BTAE |
Kojto | 110:165afa46840b | 678 | #define DSI_FLOW_CONTROL_EOTP_RX DSI_PCR_ETRXE |
Kojto | 110:165afa46840b | 679 | #define DSI_FLOW_CONTROL_EOTP_TX DSI_PCR_ETTXE |
Kojto | 110:165afa46840b | 680 | #define DSI_FLOW_CONTROL_ALL (DSI_FLOW_CONTROL_CRC_RX | DSI_FLOW_CONTROL_ECC_RX | \ |
Kojto | 110:165afa46840b | 681 | DSI_FLOW_CONTROL_BTA | DSI_FLOW_CONTROL_EOTP_RX | \ |
Kojto | 110:165afa46840b | 682 | DSI_FLOW_CONTROL_EOTP_TX) |
Kojto | 110:165afa46840b | 683 | /** |
Kojto | 110:165afa46840b | 684 | * @} |
Kojto | 110:165afa46840b | 685 | */ |
Kojto | 110:165afa46840b | 686 | |
Kojto | 110:165afa46840b | 687 | /** @defgroup DSI_Color_Coding DSI Color Coding |
Kojto | 110:165afa46840b | 688 | * @{ |
Kojto | 110:165afa46840b | 689 | */ |
Kojto | 110:165afa46840b | 690 | #define DSI_RGB565 ((uint32_t)0x00000000) /*!< The values 0x00000001 and 0x00000002 can also be used for the RGB565 color mode configuration */ |
Kojto | 110:165afa46840b | 691 | #define DSI_RGB666 ((uint32_t)0x00000003) /*!< The value 0x00000004 can also be used for the RGB666 color mode configuration */ |
Kojto | 110:165afa46840b | 692 | #define DSI_RGB888 ((uint32_t)0x00000005) |
Kojto | 110:165afa46840b | 693 | /** |
Kojto | 110:165afa46840b | 694 | * @} |
Kojto | 110:165afa46840b | 695 | */ |
Kojto | 110:165afa46840b | 696 | |
Kojto | 110:165afa46840b | 697 | /** @defgroup DSI_LooselyPacked DSI Loosely Packed |
Kojto | 110:165afa46840b | 698 | * @{ |
Kojto | 110:165afa46840b | 699 | */ |
Kojto | 110:165afa46840b | 700 | #define DSI_LOOSELY_PACKED_ENABLE DSI_LCOLCR_LPE |
Kojto | 110:165afa46840b | 701 | #define DSI_LOOSELY_PACKED_DISABLE 0 |
Kojto | 110:165afa46840b | 702 | /** |
Kojto | 110:165afa46840b | 703 | * @} |
Kojto | 110:165afa46840b | 704 | */ |
Kojto | 110:165afa46840b | 705 | |
Kojto | 110:165afa46840b | 706 | /** @defgroup DSI_HSYNC_Polarity DSI HSYNC Polarity |
Kojto | 110:165afa46840b | 707 | * @{ |
Kojto | 110:165afa46840b | 708 | */ |
Kojto | 110:165afa46840b | 709 | #define DSI_HSYNC_ACTIVE_HIGH 0 |
Kojto | 110:165afa46840b | 710 | #define DSI_HSYNC_ACTIVE_LOW DSI_LPCR_HSP |
Kojto | 110:165afa46840b | 711 | /** |
Kojto | 110:165afa46840b | 712 | * @} |
Kojto | 110:165afa46840b | 713 | */ |
Kojto | 110:165afa46840b | 714 | |
Kojto | 110:165afa46840b | 715 | /** @defgroup DSI_VSYNC_Polarity DSI VSYNC Polarity |
Kojto | 110:165afa46840b | 716 | * @{ |
Kojto | 110:165afa46840b | 717 | */ |
Kojto | 110:165afa46840b | 718 | #define DSI_VSYNC_ACTIVE_HIGH 0 |
Kojto | 110:165afa46840b | 719 | #define DSI_VSYNC_ACTIVE_LOW DSI_LPCR_VSP |
Kojto | 110:165afa46840b | 720 | /** |
Kojto | 110:165afa46840b | 721 | * @} |
Kojto | 110:165afa46840b | 722 | */ |
Kojto | 110:165afa46840b | 723 | |
Kojto | 110:165afa46840b | 724 | /** @defgroup DSI_DATA_ENABLE_Polarity DSI DATA ENABLE Polarity |
Kojto | 110:165afa46840b | 725 | * @{ |
Kojto | 110:165afa46840b | 726 | */ |
Kojto | 110:165afa46840b | 727 | #define DSI_DATA_ENABLE_ACTIVE_HIGH 0 |
Kojto | 110:165afa46840b | 728 | #define DSI_DATA_ENABLE_ACTIVE_LOW DSI_LPCR_DEP |
Kojto | 110:165afa46840b | 729 | /** |
Kojto | 110:165afa46840b | 730 | * @} |
Kojto | 110:165afa46840b | 731 | */ |
Kojto | 110:165afa46840b | 732 | |
Kojto | 110:165afa46840b | 733 | /** @defgroup DSI_PLL_IDF DSI PLL IDF |
Kojto | 110:165afa46840b | 734 | * @{ |
Kojto | 110:165afa46840b | 735 | */ |
Kojto | 110:165afa46840b | 736 | #define DSI_PLL_IN_DIV1 ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 737 | #define DSI_PLL_IN_DIV2 ((uint32_t)0x00000002) |
Kojto | 110:165afa46840b | 738 | #define DSI_PLL_IN_DIV3 ((uint32_t)0x00000003) |
Kojto | 110:165afa46840b | 739 | #define DSI_PLL_IN_DIV4 ((uint32_t)0x00000004) |
Kojto | 110:165afa46840b | 740 | #define DSI_PLL_IN_DIV5 ((uint32_t)0x00000005) |
Kojto | 110:165afa46840b | 741 | #define DSI_PLL_IN_DIV6 ((uint32_t)0x00000006) |
Kojto | 110:165afa46840b | 742 | #define DSI_PLL_IN_DIV7 ((uint32_t)0x00000007) |
Kojto | 110:165afa46840b | 743 | /** |
Kojto | 110:165afa46840b | 744 | * @} |
Kojto | 110:165afa46840b | 745 | */ |
Kojto | 110:165afa46840b | 746 | |
Kojto | 110:165afa46840b | 747 | /** @defgroup DSI_PLL_ODF DSI PLL ODF |
Kojto | 110:165afa46840b | 748 | * @{ |
Kojto | 110:165afa46840b | 749 | */ |
Kojto | 110:165afa46840b | 750 | #define DSI_PLL_OUT_DIV1 ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 751 | #define DSI_PLL_OUT_DIV2 ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 752 | #define DSI_PLL_OUT_DIV4 ((uint32_t)0x00000002) |
Kojto | 110:165afa46840b | 753 | #define DSI_PLL_OUT_DIV8 ((uint32_t)0x00000003) |
Kojto | 110:165afa46840b | 754 | /** |
Kojto | 110:165afa46840b | 755 | * @} |
Kojto | 110:165afa46840b | 756 | */ |
Kojto | 110:165afa46840b | 757 | |
Kojto | 110:165afa46840b | 758 | /** @defgroup DSI_Flags DSI Flags |
Kojto | 110:165afa46840b | 759 | * @{ |
Kojto | 110:165afa46840b | 760 | */ |
Kojto | 110:165afa46840b | 761 | #define DSI_FLAG_TE DSI_WISR_TEIF |
Kojto | 110:165afa46840b | 762 | #define DSI_FLAG_ER DSI_WISR_ERIF |
Kojto | 110:165afa46840b | 763 | #define DSI_FLAG_BUSY DSI_WISR_BUSY |
Kojto | 110:165afa46840b | 764 | #define DSI_FLAG_PLLLS DSI_WISR_PLLLS |
Kojto | 110:165afa46840b | 765 | #define DSI_FLAG_PLLL DSI_WISR_PLLLIF |
Kojto | 110:165afa46840b | 766 | #define DSI_FLAG_PLLU DSI_WISR_PLLUIF |
Kojto | 110:165afa46840b | 767 | #define DSI_FLAG_RRS DSI_WISR_RRS |
Kojto | 110:165afa46840b | 768 | #define DSI_FLAG_RR DSI_WISR_RRIF |
Kojto | 110:165afa46840b | 769 | /** |
Kojto | 110:165afa46840b | 770 | * @} |
Kojto | 110:165afa46840b | 771 | */ |
Kojto | 110:165afa46840b | 772 | |
Kojto | 110:165afa46840b | 773 | /** @defgroup DSI_Interrupts DSI Interrupts |
Kojto | 110:165afa46840b | 774 | * @{ |
Kojto | 110:165afa46840b | 775 | */ |
Kojto | 110:165afa46840b | 776 | #define DSI_IT_TE DSI_WIER_TEIE |
Kojto | 110:165afa46840b | 777 | #define DSI_IT_ER DSI_WIER_ERIE |
Kojto | 110:165afa46840b | 778 | #define DSI_IT_PLLL DSI_WIER_PLLLIE |
Kojto | 110:165afa46840b | 779 | #define DSI_IT_PLLU DSI_WIER_PLLUIE |
Kojto | 110:165afa46840b | 780 | #define DSI_IT_RR DSI_WIER_RRIE |
Kojto | 110:165afa46840b | 781 | /** |
Kojto | 110:165afa46840b | 782 | * @} |
Kojto | 110:165afa46840b | 783 | */ |
Kojto | 110:165afa46840b | 784 | |
Kojto | 110:165afa46840b | 785 | /** @defgroup DSI_SHORT_WRITE_PKT_Data_Type DSI SHORT WRITE PKT Data Type |
Kojto | 110:165afa46840b | 786 | * @{ |
Kojto | 110:165afa46840b | 787 | */ |
Kojto | 110:165afa46840b | 788 | #define DSI_DCS_SHORT_PKT_WRITE_P0 ((uint32_t)0x00000005) /*!< DCS short write, no parameters */ |
Kojto | 110:165afa46840b | 789 | #define DSI_DCS_SHORT_PKT_WRITE_P1 ((uint32_t)0x00000015) /*!< DCS short write, one parameter */ |
Kojto | 110:165afa46840b | 790 | #define DSI_GEN_SHORT_PKT_WRITE_P0 ((uint32_t)0x00000003) /*!< Generic short write, no parameters */ |
Kojto | 110:165afa46840b | 791 | #define DSI_GEN_SHORT_PKT_WRITE_P1 ((uint32_t)0x00000013) /*!< Generic short write, one parameter */ |
Kojto | 110:165afa46840b | 792 | #define DSI_GEN_SHORT_PKT_WRITE_P2 ((uint32_t)0x00000023) /*!< Generic short write, two parameters */ |
Kojto | 110:165afa46840b | 793 | /** |
Kojto | 110:165afa46840b | 794 | * @} |
Kojto | 110:165afa46840b | 795 | */ |
Kojto | 110:165afa46840b | 796 | |
Kojto | 110:165afa46840b | 797 | /** @defgroup DSI_LONG_WRITE_PKT_Data_Type DSI LONG WRITE PKT Data Type |
Kojto | 110:165afa46840b | 798 | * @{ |
Kojto | 110:165afa46840b | 799 | */ |
Kojto | 110:165afa46840b | 800 | #define DSI_DCS_LONG_PKT_WRITE ((uint32_t)0x00000039) /*!< DCS long write */ |
Kojto | 110:165afa46840b | 801 | #define DSI_GEN_LONG_PKT_WRITE ((uint32_t)0x00000029) /*!< Generic long write */ |
Kojto | 110:165afa46840b | 802 | /** |
Kojto | 110:165afa46840b | 803 | * @} |
Kojto | 110:165afa46840b | 804 | */ |
Kojto | 110:165afa46840b | 805 | |
Kojto | 110:165afa46840b | 806 | /** @defgroup DSI_SHORT_READ_PKT_Data_Type DSI SHORT READ PKT Data Type |
Kojto | 110:165afa46840b | 807 | * @{ |
Kojto | 110:165afa46840b | 808 | */ |
Kojto | 110:165afa46840b | 809 | #define DSI_DCS_SHORT_PKT_READ ((uint32_t)0x00000006) /*!< DCS short read */ |
Kojto | 110:165afa46840b | 810 | #define DSI_GEN_SHORT_PKT_READ_P0 ((uint32_t)0x00000004) /*!< Generic short read, no parameters */ |
Kojto | 110:165afa46840b | 811 | #define DSI_GEN_SHORT_PKT_READ_P1 ((uint32_t)0x00000014) /*!< Generic short read, one parameter */ |
Kojto | 110:165afa46840b | 812 | #define DSI_GEN_SHORT_PKT_READ_P2 ((uint32_t)0x00000024) /*!< Generic short read, two parameters */ |
Kojto | 110:165afa46840b | 813 | /** |
Kojto | 110:165afa46840b | 814 | * @} |
Kojto | 110:165afa46840b | 815 | */ |
Kojto | 110:165afa46840b | 816 | |
Kojto | 110:165afa46840b | 817 | /** @defgroup DSI_Error_Data_Type DSI Error Data Type |
Kojto | 110:165afa46840b | 818 | * @{ |
Kojto | 110:165afa46840b | 819 | */ |
Kojto | 110:165afa46840b | 820 | #define HAL_DSI_ERROR_NONE 0 |
Kojto | 110:165afa46840b | 821 | #define HAL_DSI_ERROR_ACK ((uint32_t)0x00000001) /*!< acknowledge errors */ |
Kojto | 110:165afa46840b | 822 | #define HAL_DSI_ERROR_PHY ((uint32_t)0x00000002) /*!< PHY related errors */ |
Kojto | 110:165afa46840b | 823 | #define HAL_DSI_ERROR_TX ((uint32_t)0x00000004) /*!< transmission error */ |
Kojto | 110:165afa46840b | 824 | #define HAL_DSI_ERROR_RX ((uint32_t)0x00000008) /*!< reception error */ |
Kojto | 110:165afa46840b | 825 | #define HAL_DSI_ERROR_ECC ((uint32_t)0x00000010) /*!< ECC errors */ |
Kojto | 110:165afa46840b | 826 | #define HAL_DSI_ERROR_CRC ((uint32_t)0x00000020) /*!< CRC error */ |
Kojto | 110:165afa46840b | 827 | #define HAL_DSI_ERROR_PSE ((uint32_t)0x00000040) /*!< Packet Size error */ |
Kojto | 110:165afa46840b | 828 | #define HAL_DSI_ERROR_EOT ((uint32_t)0x00000080) /*!< End Of Transmission error */ |
Kojto | 110:165afa46840b | 829 | #define HAL_DSI_ERROR_OVF ((uint32_t)0x00000100) /*!< FIFO overflow error */ |
Kojto | 110:165afa46840b | 830 | #define HAL_DSI_ERROR_GEN ((uint32_t)0x00000200) /*!< Generic FIFO related errors */ |
Kojto | 110:165afa46840b | 831 | /** |
Kojto | 110:165afa46840b | 832 | * @} |
Kojto | 110:165afa46840b | 833 | */ |
Kojto | 110:165afa46840b | 834 | |
Kojto | 110:165afa46840b | 835 | /** @defgroup DSI_Lane_Group DSI Lane Group |
Kojto | 110:165afa46840b | 836 | * @{ |
Kojto | 110:165afa46840b | 837 | */ |
Kojto | 110:165afa46840b | 838 | #define DSI_CLOCK_LANE ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 839 | #define DSI_DATA_LANES ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 840 | /** |
Kojto | 110:165afa46840b | 841 | * @} |
Kojto | 110:165afa46840b | 842 | */ |
Kojto | 110:165afa46840b | 843 | |
Kojto | 110:165afa46840b | 844 | /** @defgroup DSI_Communication_Delay DSI Communication Delay |
Kojto | 110:165afa46840b | 845 | * @{ |
Kojto | 110:165afa46840b | 846 | */ |
Kojto | 110:165afa46840b | 847 | #define DSI_SLEW_RATE_HSTX ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 848 | #define DSI_SLEW_RATE_LPTX ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 849 | #define DSI_HS_DELAY ((uint32_t)0x00000002) |
Kojto | 110:165afa46840b | 850 | /** |
Kojto | 110:165afa46840b | 851 | * @} |
Kojto | 110:165afa46840b | 852 | */ |
Kojto | 110:165afa46840b | 853 | |
Kojto | 110:165afa46840b | 854 | /** @defgroup DSI_CustomLane DSI CustomLane |
Kojto | 110:165afa46840b | 855 | * @{ |
Kojto | 110:165afa46840b | 856 | */ |
Kojto | 110:165afa46840b | 857 | #define DSI_SWAP_LANE_PINS ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 858 | #define DSI_INVERT_HS_SIGNAL ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 859 | /** |
Kojto | 110:165afa46840b | 860 | * @} |
Kojto | 110:165afa46840b | 861 | */ |
Kojto | 110:165afa46840b | 862 | |
Kojto | 110:165afa46840b | 863 | /** @defgroup DSI_Lane_Select DSI Lane Select |
Kojto | 110:165afa46840b | 864 | * @{ |
Kojto | 110:165afa46840b | 865 | */ |
Kojto | 110:165afa46840b | 866 | #define DSI_CLOCK_LANE ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 867 | #define DSI_DATA_LANE0 ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 868 | #define DSI_DATA_LANE1 ((uint32_t)0x00000002) |
Kojto | 110:165afa46840b | 869 | /** |
Kojto | 110:165afa46840b | 870 | * @} |
Kojto | 110:165afa46840b | 871 | */ |
Kojto | 110:165afa46840b | 872 | |
Kojto | 110:165afa46840b | 873 | /** @defgroup DSI_PHY_Timing DSI PHY Timing |
Kojto | 110:165afa46840b | 874 | * @{ |
Kojto | 110:165afa46840b | 875 | */ |
Kojto | 110:165afa46840b | 876 | #define DSI_TCLK_POST ((uint32_t)0x00000000) |
Kojto | 110:165afa46840b | 877 | #define DSI_TLPX_CLK ((uint32_t)0x00000001) |
Kojto | 110:165afa46840b | 878 | #define DSI_THS_EXIT ((uint32_t)0x00000002) |
Kojto | 110:165afa46840b | 879 | #define DSI_TLPX_DATA ((uint32_t)0x00000003) |
Kojto | 110:165afa46840b | 880 | #define DSI_THS_ZERO ((uint32_t)0x00000004) |
Kojto | 110:165afa46840b | 881 | #define DSI_THS_TRAIL ((uint32_t)0x00000005) |
Kojto | 110:165afa46840b | 882 | #define DSI_THS_PREPARE ((uint32_t)0x00000006) |
Kojto | 110:165afa46840b | 883 | #define DSI_TCLK_ZERO ((uint32_t)0x00000007) |
Kojto | 110:165afa46840b | 884 | #define DSI_TCLK_PREPARE ((uint32_t)0x00000008) |
Kojto | 110:165afa46840b | 885 | /** |
Kojto | 110:165afa46840b | 886 | * @} |
Kojto | 110:165afa46840b | 887 | */ |
Kojto | 110:165afa46840b | 888 | |
Kojto | 110:165afa46840b | 889 | /* Exported macros -----------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 890 | /** |
Kojto | 110:165afa46840b | 891 | * @brief Enables the DSI host. |
Kojto | 110:165afa46840b | 892 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 893 | * @retval None. |
Kojto | 110:165afa46840b | 894 | */ |
Kojto | 110:165afa46840b | 895 | #define __HAL_DSI_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DSI_CR_EN) |
Kojto | 110:165afa46840b | 896 | |
Kojto | 110:165afa46840b | 897 | /** |
Kojto | 110:165afa46840b | 898 | * @brief Disables the DSI host. |
Kojto | 110:165afa46840b | 899 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 900 | * @retval None. |
Kojto | 110:165afa46840b | 901 | */ |
Kojto | 110:165afa46840b | 902 | #define __HAL_DSI_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~DSI_CR_EN) |
Kojto | 110:165afa46840b | 903 | |
Kojto | 110:165afa46840b | 904 | /** |
Kojto | 110:165afa46840b | 905 | * @brief Enables the DSI wrapper. |
Kojto | 110:165afa46840b | 906 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 907 | * @retval None. |
Kojto | 110:165afa46840b | 908 | */ |
Kojto | 110:165afa46840b | 909 | #define __HAL_DSI_WRAPPER_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->WCR |= DSI_WCR_DSIEN) |
Kojto | 110:165afa46840b | 910 | |
Kojto | 110:165afa46840b | 911 | /** |
Kojto | 110:165afa46840b | 912 | * @brief Disable the DSI wrapper. |
Kojto | 110:165afa46840b | 913 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 914 | * @retval None. |
Kojto | 110:165afa46840b | 915 | */ |
Kojto | 110:165afa46840b | 916 | #define __HAL_DSI_WRAPPER_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->WCR &= ~DSI_WCR_DSIEN) |
Kojto | 110:165afa46840b | 917 | |
Kojto | 110:165afa46840b | 918 | /** |
Kojto | 110:165afa46840b | 919 | * @brief Enables the DSI PLL. |
Kojto | 110:165afa46840b | 920 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 921 | * @retval None. |
Kojto | 110:165afa46840b | 922 | */ |
Kojto | 110:165afa46840b | 923 | #define __HAL_DSI_PLL_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->WRPCR |= DSI_WRPCR_PLLEN) |
Kojto | 110:165afa46840b | 924 | |
Kojto | 110:165afa46840b | 925 | /** |
Kojto | 110:165afa46840b | 926 | * @brief Disables the DSI PLL. |
Kojto | 110:165afa46840b | 927 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 928 | * @retval None. |
Kojto | 110:165afa46840b | 929 | */ |
Kojto | 110:165afa46840b | 930 | #define __HAL_DSI_PLL_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->WRPCR &= ~DSI_WRPCR_PLLEN) |
Kojto | 110:165afa46840b | 931 | |
Kojto | 110:165afa46840b | 932 | /** |
Kojto | 110:165afa46840b | 933 | * @brief Enables the DSI regulator. |
Kojto | 110:165afa46840b | 934 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 935 | * @retval None. |
Kojto | 110:165afa46840b | 936 | */ |
Kojto | 110:165afa46840b | 937 | #define __HAL_DSI_REG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->WRPCR |= DSI_WRPCR_REGEN) |
Kojto | 110:165afa46840b | 938 | |
Kojto | 110:165afa46840b | 939 | /** |
Kojto | 110:165afa46840b | 940 | * @brief Disables the DSI regulator. |
Kojto | 110:165afa46840b | 941 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 942 | * @retval None. |
Kojto | 110:165afa46840b | 943 | */ |
Kojto | 110:165afa46840b | 944 | #define __HAL_DSI_REG_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->WRPCR &= ~DSI_WRPCR_REGEN) |
Kojto | 110:165afa46840b | 945 | |
Kojto | 110:165afa46840b | 946 | /** |
Kojto | 110:165afa46840b | 947 | * @brief Get the DSI pending flags. |
Kojto | 110:165afa46840b | 948 | * @param __HANDLE__: DSI handle. |
Kojto | 110:165afa46840b | 949 | * @param __FLAG__: Get the specified flag. |
Kojto | 110:165afa46840b | 950 | * This parameter can be any combination of the following values: |
Kojto | 110:165afa46840b | 951 | * @arg DSI_FLAG_TE : Tearing Effect Interrupt Flag |
Kojto | 110:165afa46840b | 952 | * @arg DSI_FLAG_ER : End of Refresh Interrupt Flag |
Kojto | 110:165afa46840b | 953 | * @arg DSI_FLAG_BUSY : Busy Flag |
Kojto | 110:165afa46840b | 954 | * @arg DSI_FLAG_PLLLS: PLL Lock Status |
Kojto | 110:165afa46840b | 955 | * @arg DSI_FLAG_PLLL : PLL Lock Interrupt Flag |
Kojto | 110:165afa46840b | 956 | * @arg DSI_FLAG_PLLU : PLL Unlock Interrupt Flag |
Kojto | 110:165afa46840b | 957 | * @arg DSI_FLAG_RRS : Regulator Ready Flag |
Kojto | 110:165afa46840b | 958 | * @arg DSI_FLAG_RR : Regulator Ready Interrupt Flag |
Kojto | 110:165afa46840b | 959 | * @retval The state of FLAG (SET or RESET). |
Kojto | 110:165afa46840b | 960 | */ |
Kojto | 110:165afa46840b | 961 | #define __HAL_DSI_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->WISR & (__FLAG__)) |
Kojto | 110:165afa46840b | 962 | |
Kojto | 110:165afa46840b | 963 | /** |
Kojto | 110:165afa46840b | 964 | * @brief Clears the DSI pending flags. |
Kojto | 110:165afa46840b | 965 | * @param __HANDLE__: DSI handle. |
Kojto | 110:165afa46840b | 966 | * @param __FLAG__: specifies the flag to clear. |
Kojto | 110:165afa46840b | 967 | * This parameter can be any combination of the following values: |
Kojto | 110:165afa46840b | 968 | * @arg DSI_FLAG_TE : Tearing Effect Interrupt Flag |
Kojto | 110:165afa46840b | 969 | * @arg DSI_FLAG_ER : End of Refresh Interrupt Flag |
Kojto | 110:165afa46840b | 970 | * @arg DSI_FLAG_PLLL : PLL Lock Interrupt Flag |
Kojto | 110:165afa46840b | 971 | * @arg DSI_FLAG_PLLU : PLL Unlock Interrupt Flag |
Kojto | 110:165afa46840b | 972 | * @arg DSI_FLAG_RR : Regulator Ready Interrupt Flag |
Kojto | 110:165afa46840b | 973 | * @retval None |
Kojto | 110:165afa46840b | 974 | */ |
Kojto | 110:165afa46840b | 975 | #define __HAL_DSI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->WIFCR = (__FLAG__)) |
Kojto | 110:165afa46840b | 976 | |
Kojto | 110:165afa46840b | 977 | /** |
Kojto | 110:165afa46840b | 978 | * @brief Enables the specified DSI interrupts. |
Kojto | 110:165afa46840b | 979 | * @param __HANDLE__: DSI handle. |
Kojto | 110:165afa46840b | 980 | * @param __INTERRUPT__: specifies the DSI interrupt sources to be enabled. |
Kojto | 110:165afa46840b | 981 | * This parameter can be any combination of the following values: |
Kojto | 110:165afa46840b | 982 | * @arg DSI_IT_TE : Tearing Effect Interrupt |
Kojto | 110:165afa46840b | 983 | * @arg DSI_IT_ER : End of Refresh Interrupt |
Kojto | 110:165afa46840b | 984 | * @arg DSI_IT_PLLL: PLL Lock Interrupt |
Kojto | 110:165afa46840b | 985 | * @arg DSI_IT_PLLU: PLL Unlock Interrupt |
Kojto | 110:165afa46840b | 986 | * @arg DSI_IT_RR : Regulator Ready Interrupt |
Kojto | 110:165afa46840b | 987 | * @retval None |
Kojto | 110:165afa46840b | 988 | */ |
Kojto | 110:165afa46840b | 989 | #define __HAL_DSI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->WIER |= (__INTERRUPT__)) |
Kojto | 110:165afa46840b | 990 | |
Kojto | 110:165afa46840b | 991 | /** |
Kojto | 110:165afa46840b | 992 | * @brief Disables the specified DSI interrupts. |
Kojto | 110:165afa46840b | 993 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 994 | * @param __INTERRUPT__: specifies the DSI interrupt sources to be disabled. |
Kojto | 110:165afa46840b | 995 | * This parameter can be any combination of the following values: |
Kojto | 110:165afa46840b | 996 | * @arg DSI_IT_TE : Tearing Effect Interrupt |
Kojto | 110:165afa46840b | 997 | * @arg DSI_IT_ER : End of Refresh Interrupt |
Kojto | 110:165afa46840b | 998 | * @arg DSI_IT_PLLL: PLL Lock Interrupt |
Kojto | 110:165afa46840b | 999 | * @arg DSI_IT_PLLU: PLL Unlock Interrupt |
Kojto | 110:165afa46840b | 1000 | * @arg DSI_IT_RR : Regulator Ready Interrupt |
Kojto | 110:165afa46840b | 1001 | * @retval None |
Kojto | 110:165afa46840b | 1002 | */ |
Kojto | 110:165afa46840b | 1003 | #define __HAL_DSI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->WIER &= ~(__INTERRUPT__)) |
Kojto | 110:165afa46840b | 1004 | |
Kojto | 110:165afa46840b | 1005 | /** |
Kojto | 110:165afa46840b | 1006 | * @brief Checks whether the specified DSI interrupt has occurred or not. |
Kojto | 110:165afa46840b | 1007 | * @param __HANDLE__: DSI handle |
Kojto | 110:165afa46840b | 1008 | * @param __INTERRUPT__: specifies the DSI interrupt source to check. |
Kojto | 110:165afa46840b | 1009 | * This parameter can be one of the following values: |
Kojto | 110:165afa46840b | 1010 | * @arg DSI_IT_TE : Tearing Effect Interrupt |
Kojto | 110:165afa46840b | 1011 | * @arg DSI_IT_ER : End of Refresh Interrupt |
Kojto | 110:165afa46840b | 1012 | * @arg DSI_IT_PLLL: PLL Lock Interrupt |
Kojto | 110:165afa46840b | 1013 | * @arg DSI_IT_PLLU: PLL Unlock Interrupt |
Kojto | 110:165afa46840b | 1014 | * @arg DSI_IT_RR : Regulator Ready Interrupt |
Kojto | 110:165afa46840b | 1015 | * @retval The state of INTERRUPT (SET or RESET). |
Kojto | 110:165afa46840b | 1016 | */ |
Kojto | 110:165afa46840b | 1017 | #define __HAL_DSI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->WISR & (__INTERRUPT__)) |
Kojto | 110:165afa46840b | 1018 | |
Kojto | 110:165afa46840b | 1019 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1020 | /** @defgroup DSI_Exported_Functions DSI Exported Functions |
Kojto | 110:165afa46840b | 1021 | * @{ |
Kojto | 110:165afa46840b | 1022 | */ |
Kojto | 110:165afa46840b | 1023 | HAL_StatusTypeDef HAL_DSI_Init(DSI_HandleTypeDef *hdsi, DSI_PLLInitTypeDef *PLLInit); |
Kojto | 110:165afa46840b | 1024 | HAL_StatusTypeDef HAL_DSI_DeInit(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1025 | void HAL_DSI_MspInit(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1026 | void HAL_DSI_MspDeInit(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1027 | |
Kojto | 110:165afa46840b | 1028 | void HAL_DSI_IRQHandler(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1029 | void HAL_DSI_TearingEffectCallback(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1030 | void HAL_DSI_EndOfRefreshCallback(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1031 | void HAL_DSI_ErrorCallback(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1032 | |
Kojto | 110:165afa46840b | 1033 | HAL_StatusTypeDef HAL_DSI_SetGenericVCID(DSI_HandleTypeDef *hdsi, uint32_t VirtualChannelID); |
Kojto | 110:165afa46840b | 1034 | HAL_StatusTypeDef HAL_DSI_ConfigVideoMode(DSI_HandleTypeDef *hdsi, DSI_VidCfgTypeDef *VidCfg); |
Kojto | 110:165afa46840b | 1035 | HAL_StatusTypeDef HAL_DSI_ConfigAdaptedCommandMode(DSI_HandleTypeDef *hdsi, DSI_CmdCfgTypeDef *CmdCfg); |
Kojto | 110:165afa46840b | 1036 | HAL_StatusTypeDef HAL_DSI_ConfigCommand(DSI_HandleTypeDef *hdsi, DSI_LPCmdTypeDef *LPCmd); |
Kojto | 110:165afa46840b | 1037 | HAL_StatusTypeDef HAL_DSI_ConfigFlowControl(DSI_HandleTypeDef *hdsi, uint32_t FlowControl); |
Kojto | 110:165afa46840b | 1038 | HAL_StatusTypeDef HAL_DSI_ConfigPhyTimer(DSI_HandleTypeDef *hdsi, DSI_PHY_TimerTypeDef *PhyTimings); |
Kojto | 110:165afa46840b | 1039 | HAL_StatusTypeDef HAL_DSI_ConfigHostTimeouts(DSI_HandleTypeDef *hdsi, DSI_HOST_TimeoutTypeDef *HostTimeouts); |
Kojto | 110:165afa46840b | 1040 | HAL_StatusTypeDef HAL_DSI_Start(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1041 | HAL_StatusTypeDef HAL_DSI_Stop(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1042 | HAL_StatusTypeDef HAL_DSI_Refresh(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1043 | HAL_StatusTypeDef HAL_DSI_ColorMode(DSI_HandleTypeDef *hdsi, uint32_t ColorMode); |
Kojto | 110:165afa46840b | 1044 | HAL_StatusTypeDef HAL_DSI_Shutdown(DSI_HandleTypeDef *hdsi, uint32_t Shutdown); |
Kojto | 110:165afa46840b | 1045 | HAL_StatusTypeDef HAL_DSI_ShortWrite(DSI_HandleTypeDef *hdsi, |
Kojto | 110:165afa46840b | 1046 | uint32_t ChannelID, |
Kojto | 110:165afa46840b | 1047 | uint32_t Mode, |
Kojto | 110:165afa46840b | 1048 | uint32_t Param1, |
Kojto | 110:165afa46840b | 1049 | uint32_t Param2); |
Kojto | 110:165afa46840b | 1050 | HAL_StatusTypeDef HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi, |
Kojto | 110:165afa46840b | 1051 | uint32_t ChannelID, |
Kojto | 110:165afa46840b | 1052 | uint32_t Mode, |
Kojto | 110:165afa46840b | 1053 | uint32_t Nbparams, |
Kojto | 110:165afa46840b | 1054 | uint32_t Param1, |
Kojto | 110:165afa46840b | 1055 | uint8_t* ParametersTable); |
Kojto | 110:165afa46840b | 1056 | HAL_StatusTypeDef HAL_DSI_Read(DSI_HandleTypeDef *hdsi, |
Kojto | 110:165afa46840b | 1057 | uint32_t ChannelNbr, |
Kojto | 110:165afa46840b | 1058 | uint8_t* Array, |
Kojto | 110:165afa46840b | 1059 | uint32_t Size, |
Kojto | 110:165afa46840b | 1060 | uint32_t Mode, |
Kojto | 110:165afa46840b | 1061 | uint32_t DCSCmd, |
Kojto | 110:165afa46840b | 1062 | uint8_t* ParametersTable); |
Kojto | 110:165afa46840b | 1063 | HAL_StatusTypeDef HAL_DSI_EnterULPMData(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1064 | HAL_StatusTypeDef HAL_DSI_ExitULPMData(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1065 | HAL_StatusTypeDef HAL_DSI_EnterULPM(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1066 | HAL_StatusTypeDef HAL_DSI_ExitULPM(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1067 | |
Kojto | 110:165afa46840b | 1068 | HAL_StatusTypeDef HAL_DSI_PatternGeneratorStart(DSI_HandleTypeDef *hdsi, uint32_t Mode, uint32_t Orientation); |
Kojto | 110:165afa46840b | 1069 | HAL_StatusTypeDef HAL_DSI_PatternGeneratorStop(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1070 | |
Kojto | 110:165afa46840b | 1071 | HAL_StatusTypeDef HAL_DSI_SetSlewRateAndDelayTuning(DSI_HandleTypeDef *hdsi, uint32_t CommDelay, uint32_t Lane, uint32_t Value); |
Kojto | 110:165afa46840b | 1072 | HAL_StatusTypeDef HAL_DSI_SetLowPowerRXFilter(DSI_HandleTypeDef *hdsi, uint32_t Frequency); |
Kojto | 110:165afa46840b | 1073 | HAL_StatusTypeDef HAL_DSI_SetSDD(DSI_HandleTypeDef *hdsi, FunctionalState State); |
Kojto | 110:165afa46840b | 1074 | HAL_StatusTypeDef HAL_DSI_SetLanePinsConfiguration(DSI_HandleTypeDef *hdsi, uint32_t CustomLane, uint32_t Lane, FunctionalState State); |
Kojto | 110:165afa46840b | 1075 | HAL_StatusTypeDef HAL_DSI_SetPHYTimings(DSI_HandleTypeDef *hdsi, uint32_t Timing, FunctionalState State, uint32_t Value); |
Kojto | 110:165afa46840b | 1076 | HAL_StatusTypeDef HAL_DSI_ForceTXStopMode(DSI_HandleTypeDef *hdsi, uint32_t Lane, FunctionalState State); |
Kojto | 110:165afa46840b | 1077 | HAL_StatusTypeDef HAL_DSI_ForceRXLowPower(DSI_HandleTypeDef *hdsi, FunctionalState State); |
Kojto | 110:165afa46840b | 1078 | HAL_StatusTypeDef HAL_DSI_ForceDataLanesInRX(DSI_HandleTypeDef *hdsi, FunctionalState State); |
Kojto | 110:165afa46840b | 1079 | HAL_StatusTypeDef HAL_DSI_SetPullDown(DSI_HandleTypeDef *hdsi, FunctionalState State); |
Kojto | 110:165afa46840b | 1080 | HAL_StatusTypeDef HAL_DSI_SetContentionDetectionOff(DSI_HandleTypeDef *hdsi, FunctionalState State); |
Kojto | 110:165afa46840b | 1081 | |
Kojto | 110:165afa46840b | 1082 | uint32_t HAL_DSI_GetError(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1083 | HAL_StatusTypeDef HAL_DSI_ConfigErrorMonitor(DSI_HandleTypeDef *hdsi, uint32_t ActiveErrors); |
Kojto | 110:165afa46840b | 1084 | HAL_DSI_StateTypeDef HAL_DSI_GetState(DSI_HandleTypeDef *hdsi); |
Kojto | 110:165afa46840b | 1085 | /** |
Kojto | 110:165afa46840b | 1086 | * @} |
Kojto | 110:165afa46840b | 1087 | */ |
Kojto | 110:165afa46840b | 1088 | |
Kojto | 110:165afa46840b | 1089 | /* Private types -------------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1090 | /** @defgroup DSI_Private_Types DSI Private Types |
Kojto | 110:165afa46840b | 1091 | * @{ |
Kojto | 110:165afa46840b | 1092 | */ |
Kojto | 110:165afa46840b | 1093 | |
Kojto | 110:165afa46840b | 1094 | /** |
Kojto | 110:165afa46840b | 1095 | * @} |
Kojto | 110:165afa46840b | 1096 | */ |
Kojto | 110:165afa46840b | 1097 | |
Kojto | 110:165afa46840b | 1098 | /* Private defines -----------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1099 | /** @defgroup DSI_Private_Defines DSI Private Defines |
Kojto | 110:165afa46840b | 1100 | * @{ |
Kojto | 110:165afa46840b | 1101 | */ |
Kojto | 110:165afa46840b | 1102 | |
Kojto | 110:165afa46840b | 1103 | /** |
Kojto | 110:165afa46840b | 1104 | * @} |
Kojto | 110:165afa46840b | 1105 | */ |
Kojto | 110:165afa46840b | 1106 | |
Kojto | 110:165afa46840b | 1107 | /* Private variables ---------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1108 | /** @defgroup DSI_Private_Variables DSI Private Variables |
Kojto | 110:165afa46840b | 1109 | * @{ |
Kojto | 110:165afa46840b | 1110 | */ |
Kojto | 110:165afa46840b | 1111 | |
Kojto | 110:165afa46840b | 1112 | /** |
Kojto | 110:165afa46840b | 1113 | * @} |
Kojto | 110:165afa46840b | 1114 | */ |
Kojto | 110:165afa46840b | 1115 | |
Kojto | 110:165afa46840b | 1116 | /* Private constants ---------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1117 | /** @defgroup DSI_Private_Constants DSI Private Constants |
Kojto | 110:165afa46840b | 1118 | * @{ |
Kojto | 110:165afa46840b | 1119 | */ |
Kojto | 110:165afa46840b | 1120 | #define DSI_MAX_RETURN_PKT_SIZE ((uint32_t)0x00000037) /*!< Maximum return packet configuration */ |
Kojto | 110:165afa46840b | 1121 | /** |
Kojto | 110:165afa46840b | 1122 | * @} |
Kojto | 110:165afa46840b | 1123 | */ |
Kojto | 110:165afa46840b | 1124 | |
Kojto | 110:165afa46840b | 1125 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1126 | /** @defgroup DSI_Private_Macros DSI Private Macros |
Kojto | 110:165afa46840b | 1127 | * @{ |
Kojto | 110:165afa46840b | 1128 | */ |
Kojto | 110:165afa46840b | 1129 | #define IS_DSI_PLL_NDIV(NDIV) ((10 <= (NDIV)) && ((NDIV) <= 125)) |
Kojto | 110:165afa46840b | 1130 | #define IS_DSI_PLL_IDF(IDF) (((IDF) == DSI_PLL_IN_DIV1) || \ |
Kojto | 110:165afa46840b | 1131 | ((IDF) == DSI_PLL_IN_DIV2) || \ |
Kojto | 110:165afa46840b | 1132 | ((IDF) == DSI_PLL_IN_DIV3) || \ |
Kojto | 110:165afa46840b | 1133 | ((IDF) == DSI_PLL_IN_DIV4) || \ |
Kojto | 110:165afa46840b | 1134 | ((IDF) == DSI_PLL_IN_DIV5) || \ |
Kojto | 110:165afa46840b | 1135 | ((IDF) == DSI_PLL_IN_DIV6) || \ |
Kojto | 110:165afa46840b | 1136 | ((IDF) == DSI_PLL_IN_DIV7)) |
Kojto | 110:165afa46840b | 1137 | #define IS_DSI_PLL_ODF(ODF) (((ODF) == DSI_PLL_OUT_DIV1) || \ |
Kojto | 110:165afa46840b | 1138 | ((ODF) == DSI_PLL_OUT_DIV2) || \ |
Kojto | 110:165afa46840b | 1139 | ((ODF) == DSI_PLL_OUT_DIV4) || \ |
Kojto | 110:165afa46840b | 1140 | ((ODF) == DSI_PLL_OUT_DIV8)) |
Kojto | 110:165afa46840b | 1141 | #define IS_DSI_AUTO_CLKLANE_CONTROL(AutoClkLane) (((AutoClkLane) == DSI_AUTO_CLK_LANE_CTRL_DISABLE) || ((AutoClkLane) == DSI_AUTO_CLK_LANE_CTRL_ENABLE)) |
Kojto | 110:165afa46840b | 1142 | #define IS_DSI_NUMBER_OF_LANES(NumberOfLanes) (((NumberOfLanes) == DSI_ONE_DATA_LANE) || ((NumberOfLanes) == DSI_TWO_DATA_LANES)) |
Kojto | 110:165afa46840b | 1143 | #define IS_DSI_FLOW_CONTROL(FlowControl) (((FlowControl) | DSI_FLOW_CONTROL_ALL) == DSI_FLOW_CONTROL_ALL) |
Kojto | 110:165afa46840b | 1144 | #define IS_DSI_COLOR_CODING(ColorCoding) ((ColorCoding) <= 5) |
Kojto | 110:165afa46840b | 1145 | #define IS_DSI_LOOSELY_PACKED(LooselyPacked) (((LooselyPacked) == DSI_LOOSELY_PACKED_ENABLE) || ((LooselyPacked) == DSI_LOOSELY_PACKED_DISABLE)) |
Kojto | 110:165afa46840b | 1146 | #define IS_DSI_DE_POLARITY(DataEnable) (((DataEnable) == DSI_DATA_ENABLE_ACTIVE_HIGH) || ((DataEnable) == DSI_DATA_ENABLE_ACTIVE_LOW)) |
Kojto | 110:165afa46840b | 1147 | #define IS_DSI_VSYNC_POLARITY(VSYNC) (((VSYNC) == DSI_VSYNC_ACTIVE_HIGH) || ((VSYNC) == DSI_VSYNC_ACTIVE_LOW)) |
Kojto | 110:165afa46840b | 1148 | #define IS_DSI_HSYNC_POLARITY(HSYNC) (((HSYNC) == DSI_HSYNC_ACTIVE_HIGH) || ((HSYNC) == DSI_HSYNC_ACTIVE_LOW)) |
Kojto | 110:165afa46840b | 1149 | #define IS_DSI_VIDEO_MODE_TYPE(VideoModeType) (((VideoModeType) == DSI_VID_MODE_NB_PULSES) || \ |
Kojto | 110:165afa46840b | 1150 | ((VideoModeType) == DSI_VID_MODE_NB_EVENTS) || \ |
Kojto | 110:165afa46840b | 1151 | ((VideoModeType) == DSI_VID_MODE_BURST)) |
Kojto | 110:165afa46840b | 1152 | #define IS_DSI_COLOR_MODE(ColorMode) (((ColorMode) == DSI_COLOR_MODE_FULL) || ((ColorMode) == DSI_COLOR_MODE_EIGHT)) |
Kojto | 110:165afa46840b | 1153 | #define IS_DSI_SHUT_DOWN(ShutDown) (((ShutDown) == DSI_DISPLAY_ON) || ((ShutDown) == DSI_DISPLAY_OFF)) |
Kojto | 110:165afa46840b | 1154 | #define IS_DSI_LP_COMMAND(LPCommand) (((LPCommand) == DSI_LP_COMMAND_DISABLE) || ((LPCommand) == DSI_LP_COMMAND_ENABLE)) |
Kojto | 110:165afa46840b | 1155 | #define IS_DSI_LP_HFP(LPHFP) (((LPHFP) == DSI_LP_HFP_DISABLE) || ((LPHFP) == DSI_LP_HFP_ENABLE)) |
Kojto | 110:165afa46840b | 1156 | #define IS_DSI_LP_HBP(LPHBP) (((LPHBP) == DSI_LP_HBP_DISABLE) || ((LPHBP) == DSI_LP_HBP_ENABLE)) |
Kojto | 110:165afa46840b | 1157 | #define IS_DSI_LP_VACTIVE(LPVActive) (((LPVActive) == DSI_LP_VACT_DISABLE) || ((LPVActive) == DSI_LP_VACT_ENABLE)) |
Kojto | 110:165afa46840b | 1158 | #define IS_DSI_LP_VFP(LPVFP) (((LPVFP) == DSI_LP_VFP_DISABLE) || ((LPVFP) == DSI_LP_VFP_ENABLE)) |
Kojto | 110:165afa46840b | 1159 | #define IS_DSI_LP_VBP(LPVBP) (((LPVBP) == DSI_LP_VBP_DISABLE) || ((LPVBP) == DSI_LP_VBP_ENABLE)) |
Kojto | 110:165afa46840b | 1160 | #define IS_DSI_LP_VSYNC(LPVSYNC) (((LPVSYNC) == DSI_LP_VSYNC_DISABLE) || ((LPVSYNC) == DSI_LP_VSYNC_ENABLE)) |
Kojto | 110:165afa46840b | 1161 | #define IS_DSI_FBTAA(FrameBTAAcknowledge) (((FrameBTAAcknowledge) == DSI_FBTAA_DISABLE) || ((FrameBTAAcknowledge) == DSI_FBTAA_ENABLE)) |
Kojto | 110:165afa46840b | 1162 | #define IS_DSI_TE_SOURCE(TESource) (((TESource) == DSI_TE_DSILINK) || ((TESource) == DSI_TE_EXTERNAL)) |
Kojto | 110:165afa46840b | 1163 | #define IS_DSI_TE_POLARITY(TEPolarity) (((TEPolarity) == DSI_TE_RISING_EDGE) || ((TEPolarity) == DSI_TE_FALLING_EDGE)) |
Kojto | 110:165afa46840b | 1164 | #define IS_DSI_AUTOMATIC_REFRESH(AutomaticRefresh) (((AutomaticRefresh) == DSI_AR_DISABLE) || ((AutomaticRefresh) == DSI_AR_ENABLE)) |
Kojto | 110:165afa46840b | 1165 | #define IS_DSI_VS_POLARITY(VSPolarity) (((VSPolarity) == DSI_VSYNC_FALLING) || ((VSPolarity) == DSI_VSYNC_RISING)) |
Kojto | 110:165afa46840b | 1166 | #define IS_DSI_TE_ACK_REQUEST(TEAcknowledgeRequest) (((TEAcknowledgeRequest) == DSI_TE_ACKNOWLEDGE_DISABLE) || ((TEAcknowledgeRequest) == DSI_TE_ACKNOWLEDGE_ENABLE)) |
Kojto | 110:165afa46840b | 1167 | #define IS_DSI_ACK_REQUEST(AcknowledgeRequest) (((AcknowledgeRequest) == DSI_ACKNOWLEDGE_DISABLE) || ((AcknowledgeRequest) == DSI_ACKNOWLEDGE_ENABLE)) |
Kojto | 110:165afa46840b | 1168 | #define IS_DSI_LP_GSW0P(LP_GSW0P) (((LP_GSW0P) == DSI_LP_GSW0P_DISABLE) || ((LP_GSW0P) == DSI_LP_GSW0P_ENABLE)) |
Kojto | 110:165afa46840b | 1169 | #define IS_DSI_LP_GSW1P(LP_GSW1P) (((LP_GSW1P) == DSI_LP_GSW1P_DISABLE) || ((LP_GSW1P) == DSI_LP_GSW1P_ENABLE)) |
Kojto | 110:165afa46840b | 1170 | #define IS_DSI_LP_GSW2P(LP_GSW2P) (((LP_GSW2P) == DSI_LP_GSW2P_DISABLE) || ((LP_GSW2P) == DSI_LP_GSW2P_ENABLE)) |
Kojto | 110:165afa46840b | 1171 | #define IS_DSI_LP_GSR0P(LP_GSR0P) (((LP_GSR0P) == DSI_LP_GSR0P_DISABLE) || ((LP_GSR0P) == DSI_LP_GSR0P_ENABLE)) |
Kojto | 110:165afa46840b | 1172 | #define IS_DSI_LP_GSR1P(LP_GSR1P) (((LP_GSR1P) == DSI_LP_GSR1P_DISABLE) || ((LP_GSR1P) == DSI_LP_GSR1P_ENABLE)) |
Kojto | 110:165afa46840b | 1173 | #define IS_DSI_LP_GSR2P(LP_GSR2P) (((LP_GSR2P) == DSI_LP_GSR2P_DISABLE) || ((LP_GSR2P) == DSI_LP_GSR2P_ENABLE)) |
Kojto | 110:165afa46840b | 1174 | #define IS_DSI_LP_GLW(LP_GLW) (((LP_GLW) == DSI_LP_GLW_DISABLE) || ((LP_GLW) == DSI_LP_GLW_ENABLE)) |
Kojto | 110:165afa46840b | 1175 | #define IS_DSI_LP_DSW0P(LP_DSW0P) (((LP_DSW0P) == DSI_LP_DSW0P_DISABLE) || ((LP_DSW0P) == DSI_LP_DSW0P_ENABLE)) |
Kojto | 110:165afa46840b | 1176 | #define IS_DSI_LP_DSW1P(LP_DSW1P) (((LP_DSW1P) == DSI_LP_DSW1P_DISABLE) || ((LP_DSW1P) == DSI_LP_DSW1P_ENABLE)) |
Kojto | 110:165afa46840b | 1177 | #define IS_DSI_LP_DSR0P(LP_DSR0P) (((LP_DSR0P) == DSI_LP_DSR0P_DISABLE) || ((LP_DSR0P) == DSI_LP_DSR0P_ENABLE)) |
Kojto | 110:165afa46840b | 1178 | #define IS_DSI_LP_DLW(LP_DLW) (((LP_DLW) == DSI_LP_DLW_DISABLE) || ((LP_DLW) == DSI_LP_DLW_ENABLE)) |
Kojto | 110:165afa46840b | 1179 | #define IS_DSI_LP_MRDP(LP_MRDP) (((LP_MRDP) == DSI_LP_MRDP_DISABLE) || ((LP_MRDP) == DSI_LP_MRDP_ENABLE)) |
Kojto | 110:165afa46840b | 1180 | #define IS_DSI_SHORT_WRITE_PACKET_TYPE(MODE) (((MODE) == DSI_DCS_SHORT_PKT_WRITE_P0) || \ |
Kojto | 110:165afa46840b | 1181 | ((MODE) == DSI_DCS_SHORT_PKT_WRITE_P1) || \ |
Kojto | 110:165afa46840b | 1182 | ((MODE) == DSI_GEN_SHORT_PKT_WRITE_P0) || \ |
Kojto | 110:165afa46840b | 1183 | ((MODE) == DSI_GEN_SHORT_PKT_WRITE_P1) || \ |
Kojto | 110:165afa46840b | 1184 | ((MODE) == DSI_GEN_SHORT_PKT_WRITE_P2)) |
Kojto | 110:165afa46840b | 1185 | #define IS_DSI_LONG_WRITE_PACKET_TYPE(MODE) (((MODE) == DSI_DCS_LONG_PKT_WRITE) || \ |
Kojto | 110:165afa46840b | 1186 | ((MODE) == DSI_GEN_LONG_PKT_WRITE)) |
Kojto | 110:165afa46840b | 1187 | #define IS_DSI_READ_PACKET_TYPE(MODE) (((MODE) == DSI_DCS_SHORT_PKT_READ) || \ |
Kojto | 110:165afa46840b | 1188 | ((MODE) == DSI_GEN_SHORT_PKT_READ_P0) || \ |
Kojto | 110:165afa46840b | 1189 | ((MODE) == DSI_GEN_SHORT_PKT_READ_P1) || \ |
Kojto | 110:165afa46840b | 1190 | ((MODE) == DSI_GEN_SHORT_PKT_READ_P2)) |
Kojto | 110:165afa46840b | 1191 | #define IS_DSI_COMMUNICATION_DELAY(CommDelay) (((CommDelay) == DSI_SLEW_RATE_HSTX) || ((CommDelay) == DSI_SLEW_RATE_LPTX) || ((CommDelay) == DSI_HS_DELAY)) |
Kojto | 110:165afa46840b | 1192 | #define IS_DSI_LANE_GROUP(Lane) (((Lane) == DSI_CLOCK_LANE) || ((Lane) == DSI_DATA_LANES)) |
Kojto | 110:165afa46840b | 1193 | #define IS_DSI_CUSTOM_LANE(CustomLane) (((CustomLane) == DSI_SWAP_LANE_PINS) || ((CustomLane) == DSI_INVERT_HS_SIGNAL)) |
Kojto | 110:165afa46840b | 1194 | #define IS_DSI_LANE(Lane) (((Lane) == DSI_CLOCK_LANE) || ((Lane) == DSI_DATA_LANE0) || ((Lane) == DSI_DATA_LANE1)) |
Kojto | 110:165afa46840b | 1195 | #define IS_DSI_PHY_TIMING(Timing) (((Timing) == DSI_TCLK_POST ) || \ |
Kojto | 110:165afa46840b | 1196 | ((Timing) == DSI_TLPX_CLK ) || \ |
Kojto | 110:165afa46840b | 1197 | ((Timing) == DSI_THS_EXIT ) || \ |
Kojto | 110:165afa46840b | 1198 | ((Timing) == DSI_TLPX_DATA ) || \ |
Kojto | 110:165afa46840b | 1199 | ((Timing) == DSI_THS_ZERO ) || \ |
Kojto | 110:165afa46840b | 1200 | ((Timing) == DSI_THS_TRAIL ) || \ |
Kojto | 110:165afa46840b | 1201 | ((Timing) == DSI_THS_PREPARE ) || \ |
Kojto | 110:165afa46840b | 1202 | ((Timing) == DSI_TCLK_ZERO ) || \ |
Kojto | 110:165afa46840b | 1203 | ((Timing) == DSI_TCLK_PREPARE)) |
Kojto | 110:165afa46840b | 1204 | |
Kojto | 110:165afa46840b | 1205 | /** |
Kojto | 110:165afa46840b | 1206 | * @} |
Kojto | 110:165afa46840b | 1207 | */ |
Kojto | 110:165afa46840b | 1208 | |
Kojto | 110:165afa46840b | 1209 | /* Private functions prototypes ----------------------------------------------*/ |
Kojto | 110:165afa46840b | 1210 | /** @defgroup DSI_Private_Functions_Prototypes DSI Private Functions Prototypes |
Kojto | 110:165afa46840b | 1211 | * @{ |
Kojto | 110:165afa46840b | 1212 | */ |
Kojto | 110:165afa46840b | 1213 | |
Kojto | 110:165afa46840b | 1214 | /** |
Kojto | 110:165afa46840b | 1215 | * @} |
Kojto | 110:165afa46840b | 1216 | */ |
Kojto | 110:165afa46840b | 1217 | |
Kojto | 110:165afa46840b | 1218 | /* Private functions ---------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 1219 | /** @defgroup DSI_Private_Functions DSI Private Functions |
Kojto | 110:165afa46840b | 1220 | * @{ |
Kojto | 110:165afa46840b | 1221 | */ |
Kojto | 110:165afa46840b | 1222 | |
Kojto | 110:165afa46840b | 1223 | /** |
Kojto | 110:165afa46840b | 1224 | * @} |
Kojto | 110:165afa46840b | 1225 | */ |
Kojto | 110:165afa46840b | 1226 | |
Kojto | 110:165afa46840b | 1227 | /** |
Kojto | 110:165afa46840b | 1228 | * @} |
Kojto | 110:165afa46840b | 1229 | */ |
Kojto | 110:165afa46840b | 1230 | |
Kojto | 110:165afa46840b | 1231 | /** |
Kojto | 110:165afa46840b | 1232 | * @} |
Kojto | 110:165afa46840b | 1233 | */ |
Kojto | 110:165afa46840b | 1234 | #endif /* STM32F469xx || STM32F479xx */ |
Kojto | 110:165afa46840b | 1235 | |
Kojto | 110:165afa46840b | 1236 | #ifdef __cplusplus |
Kojto | 110:165afa46840b | 1237 | } |
Kojto | 110:165afa46840b | 1238 | #endif |
Kojto | 110:165afa46840b | 1239 | |
Kojto | 110:165afa46840b | 1240 | #endif /* __STM32F4xx_HAL_DSI_H */ |
Kojto | 110:165afa46840b | 1241 | |
Kojto | 110:165afa46840b | 1242 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |