stm32f4xx_hal_dsi.h 55 KB

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