1 /** 2 ****************************************************************************** 3 * @file stm32n6xx_hal_dcmipp.h 4 * @author MCD Application Team 5 * @brief Header file of DCMIPP HAL module. 6 ****************************************************************************** 7 * @attention 8 * 9 * Copyright (c) 2023 STMicroelectronics. 10 * All rights reserved. 11 * 12 * This software is licensed under terms that can be found in the LICENSE file 13 * in the root directory of this software component. 14 * If no LICENSE file comes with this software, it is provided AS-IS. 15 * 16 ****************************************************************************** 17 */ 18 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef __STM32N6xx_HAL_DCMIPP_H 21 #define __STM32N6xx_HAL_DCMIPP_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32n6xx_hal_def.h" 29 30 /** @addtogroup STM32N6xx_HAL_Driver 31 * @{ 32 */ 33 34 #if defined (DCMIPP) 35 36 /** @addtogroup DCMIPP DCMIPP 37 * @brief DCMIPP HAL module driver 38 * @{ 39 */ 40 41 /* Exported types ----------------------------------------------------------------------------------------------------*/ 42 /** @defgroup DCMIPP_Exported_Types DCMIPP Exported Types 43 * @brief DCMIPP Exported Types 44 * @{ 45 */ 46 #define MAX_DATATYPE_NB 7U /*!< DCMIPP CSI maximum number of data types */ 47 /** 48 * @brief DCMIPP Embedded Synchronisation Unmask codes structure definition 49 */ 50 typedef struct 51 { 52 uint8_t FrameStartUnmask; /*!< Specifies the frame start delimiter unmask. */ 53 uint8_t LineStartUnmask; /*!< Specifies the line start delimiter unmask. */ 54 uint8_t LineEndUnmask; /*!< Specifies the line end delimiter unmask. */ 55 uint8_t FrameEndUnmask; /*!< Specifies the frame end delimiter unmask. */ 56 } DCMIPP_EmbeddedSyncUnmaskTypeDef; 57 58 /** 59 * @brief DCMIPP Embedded Synchronisation codes structure definition (CCIR656) 60 */ 61 typedef struct 62 { 63 uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */ 64 uint8_t LineStartCode; /*!< Specifies the code of the line start delimiter. */ 65 uint8_t LineEndCode; /*!< Specifies the code of the line end delimiter. */ 66 uint8_t FrameEndCode; /*!< Specifies the code of the frame end delimiter. */ 67 } DCMIPP_EmbeddedSyncCodesTypeDef; 68 69 /** 70 * @brief HAL DCMIPP CSI PIPE configuration structure definition 71 */ 72 typedef struct 73 { 74 uint32_t DataTypeMode ; /*!< Configures the Data Type Mode 75 This parameter can be a value from @ref DCMIPP_DataTypeMode */ 76 uint32_t DataTypeIDA ; /*!< Configures the Data type selection ID-A 77 This parameter can be a value from @ref DCMIPP_DataType */ 78 uint32_t DataTypeIDB ; /*!< Configures the Data type selection ID-B 79 This parameter can be a value from @ref DCMIPP_DataType */ 80 } DCMIPP_CSI_PIPE_ConfTypeDef; 81 /** 82 * @brief HAL DCMIPP CSI configuration structure definition 83 */ 84 typedef struct 85 { 86 uint32_t NumberOfLanes; /*!< Configures the Number of Lanes 87 This parameter can be a value from @ref DCMIPP_CSI_Number_Of_Lanes */ 88 uint32_t DataLaneMapping; /*!< Configures the Data Lane Mapping 89 This parameter can be a value from @ref DCMIPP_CSI_DataLaneMapping */ 90 uint32_t PHYBitrate; /*!< Configures the Phy Bitrate 91 This parameter can be a value from @ref DCMIPP_CSI_PHYBitRate */ 92 } DCMIPP_CSI_ConfTypeDef; 93 /** 94 * @brief HAL DCMIPP CSI Virtual Channel Filtering configuration structure definition 95 */ 96 typedef struct 97 { 98 uint32_t DataTypeNB; /*!< Configures the Data Type number 99 This parameter can be a value from @ref DCMIPP_CSI_DataTypeID */ 100 uint32_t DataTypeClass[MAX_DATATYPE_NB]; /*!< Configures the Data Type Class 101 This parameter can be a value between 0 and 63 */ 102 uint32_t DataTypeFormat[MAX_DATATYPE_NB]; /*!< Configures the Data Type Class 103 This parameter can be a value from @ref DCMIPP_CSI_DataTypeFormat */ 104 } DCMIPP_CSI_VCFilteringConfTypeDef; 105 106 /** 107 * @brief HAL DCMIPP CSI Timer configuration structure definition 108 */ 109 typedef struct 110 { 111 uint32_t VirtualChannel; /*!< The Virtual Channel ID 112 This parameter can be a value from @ref DCMIPP_Virtual_Channel */ 113 uint32_t StartPoint; /*!< The Start Point of the counter 114 This parameter can be a value from @ref DCMIPP_CSI_Timer_StartPoint */ 115 uint32_t Count; /*!< Number of clock cycle to count from the start point 116 This parameter can be a value between 0 and 0x1FFFFFF */ 117 } DCMIPP_CSI_TimerConfTypeDef; 118 /** 119 * @brief HAL DCMIPP CSI LineByte Counter configuration structure definition 120 */ 121 typedef struct 122 { 123 uint32_t VirtualChannel; /*!< Configures the Virtual Channel ID 124 This parameter can be a value from @ref DCMIPP_Virtual_Channel */ 125 uint32_t LineCounter; /*!< Configures the Line Number 126 This parameter can be a value between 0 and 65535 */ 127 uint32_t ByteCounter; /*!< Configures the Byte Number 128 This parameter can be a value between 0 and 65535 */ 129 } DCMIPP_CSI_LineByteCounterConfTypeDef; 130 131 /** 132 * @brief HAL DCMIPP Parallel configuration structure definition 133 */ 134 typedef struct 135 { 136 uint32_t Format; /*!< Configures the DCMIPP Format 137 This parameter can be one value of @ref DCMIPP_Format */ 138 uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low. 139 This parameter can be a value of @ref DCMIPP_VSYNC_Polarity */ 140 uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low. 141 This parameter can be a value of @ref DCMIPP_HSYNC_Polarity */ 142 uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising. 143 This parameter can be a value of @ref DCMIPP_PIXCK_Polarity */ 144 uint32_t ExtendedDataMode ; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit 14-bit or 16-bits. 145 This parameter can be a value of @ref DCMIPP_Extended_Data_Mode */ 146 uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded. 147 This parameter can be a value of @ref DCMIPP_Synchronization_Mode */ 148 DCMIPP_EmbeddedSyncCodesTypeDef SynchroCodes; /*!< Specifies the code of the line/frame start delimiter and the 149 line/frame end delimiter */ 150 uint32_t SwapBits; /*!< Enable or Disable the Swap Bits. 151 This parameter can be a value of @ref DCMIPP_SWAP_BITS */ 152 uint32_t SwapCycles; /*!< Enable or Disable the Swap Cycles. 153 This parameter can be a value of @ref DCMIPP_SWAP_CYCLES */ 154 } DCMIPP_ParallelConfTypeDef; 155 156 /** 157 * @brief HAL DCMIPP Pipe configuration structure definition 158 */ 159 typedef struct 160 { 161 uint32_t FrameRate; /*!< Configures the DCMIPP Pipe Frame Rate 162 This parameter can be one value of @ref DCMIPP_Frame_Rates */ 163 uint32_t PixelPipePitch; /*!< Configures the DCMIPP Pixel Pipe Pitch 164 This parameter can be one value from */ 165 uint32_t PixelPackerFormat; /*!< Configures the DCMIPP Pixel Pipe Format 166 This parameter can be one value from @ref DCMIPP_Pixel_Packer_Format */ 167 } DCMIPP_PipeConfTypeDef; 168 169 /** 170 * @brief HAL DCMIPP IPPLUG configuration structure definition 171 */ 172 typedef struct 173 { 174 uint32_t Client; /*!< Configures the DCMIPP IPPLUG Client 175 This parameter can be a value from @ref DCMIPP_IPPLUG_Client */ 176 uint32_t MemoryPageSize; /*!< Configures the DCMIPP IPPLUG Memory page size 177 This parameter can be a value from @ref DCMIPP_Memory_Page_Size */ 178 uint32_t Traffic; /*!< Configures the DCMIPP IPPLUG Traffic 179 This parameter can be a value from @ref DCMIPP_Traffic_Burst_Size */ 180 uint32_t MaxOutstandingTransactions ; /*!< Configures the DCMIPP IPPLUG Maximum outstanding transactions 181 This parameter can be a value from 182 DCMIPP_Maximum_Outstanding_Transactions */ 183 uint32_t DPREGStart; /*!< Configures the End word of the FIFO of Clientx 184 This parameter can be a value between 0 and 0x3FF */ 185 uint32_t DPREGEnd; /*!< Configures the Start word of the FIFO of Clientx 186 This parameter can be a value between 0 and 0x3FF */ 187 uint32_t WLRURatio; /*!< Configures the DCMIPP Ratio for WLRU arbitration 188 This parameter can be a value between 0 and 15 */ 189 } DCMIPP_IPPlugConfTypeDef; 190 191 /** 192 * @brief HAL DCMIPP Crop configuration structure definition 193 */ 194 typedef struct 195 { 196 uint32_t VStart; /*!< Configures the DCMIPP Crop Vertical Start 197 This parameter can be one value between 0 and 4095 */ 198 uint32_t HStart; /*!< Configures the DCMIPP Crop Horizontal Start 199 This parameter can be one value between 0 and 4095 */ 200 uint32_t VSize; /*!< Configures the DCMIPP Crop Vertical Size 201 This parameter can be one value between 0 and 4095 */ 202 uint32_t HSize; /*!< Configures the DCMIPP Crop Horizontal Size 203 This parameter can be one value between 1 and 4095 */ 204 uint32_t PipeArea; /*!< Configures the DCMIPP Crop Area for the pipe0 205 This parameter can be one value of @ref DCMIPP_Crop_Area */ 206 } DCMIPP_CropConfTypeDef; 207 208 typedef struct 209 { 210 uint32_t VStart; /*!< Configures the DCMIPP Statistic Extraction Vertical Start 211 This parameter can be one value between 0 and 4095 */ 212 uint32_t HStart; /*!< Configures the DCMIPP Statistic Extraction Horizontal Start 213 This parameter can be one value between 0 and 4095 */ 214 uint32_t VSize; /*!< Configures the DCMIPP Statistic Extraction Vertical Size 215 This parameter can be one value between 0 and 4095 */ 216 uint32_t HSize; /*!< Configures the DCMIPP Statistic Extraction Horizontal Size 217 This parameter can be one value between 0 and 4095 */ 218 } DCMIPP_StatisticExtractionAreaConfTypeDef; 219 220 typedef struct 221 { 222 uint32_t Mode; /*!< Configures the DCMIPP Statistic Extraction Mode 223 This parameter can be a value from @ref DCMIPP_Statistics_Extraction_Mode */ 224 uint32_t Source; /*!< Configures the DCMIPP Statistic Extraction Source 225 This parameter can be a value from @ref DCMIPP_Statistics_Extraction_Source */ 226 uint32_t Bins; /*!< Configures the DCMIPP Statistic Extraction Bins 227 This parameter can be a value from @ref DCMIPP_Statistics_Extraction_Bins */ 228 } DCMIPP_StatisticExtractionConfTypeDef; 229 230 231 typedef struct 232 { 233 uint8_t ShiftRed; /*!< Configures the DCMIPP Exposure Shift Red 234 This parameter can be one value between 0 and 7 */ 235 uint8_t MultiplierRed; /*!< Configures the DCMIPP Exposure Multiplier Red 236 This parameter can be one value between 0 and 127 */ 237 uint8_t ShiftGreen; /*!< Configures the DCMIPP Exposure Shift Green 238 This parameter can be one value between 0 and 7 */ 239 uint8_t MultiplierGreen; /*!< Configures the DCMIPP Exposure Multiplier Green 240 This parameter can be one value between 0 and 127 */ 241 uint8_t ShiftBlue; /*!< Configures the DCMIPP Exposure Shift Blue 242 This parameter can be one value between 0 and 7 */ 243 uint8_t MultiplierBlue; /*!< Configures the DCMIPP Exposure Multiplier Blue 244 This parameter can be one value between 0 and 127 */ 245 } DCMIPP_ExposureConfTypeDef; 246 247 typedef struct 248 { 249 uint8_t LUM_0; /*!< Luminance increase for input luminance of 0 250 This parameter can be one value between 0 and 31 */ 251 uint8_t LUM_32; /*!< Luminance increase for input luminance of 32 252 This parameter can be one value between 0 and 31 */ 253 uint8_t LUM_64; /*!< Luminance increase for input luminance of 64 254 This parameter can be one value between 0 and 31 */ 255 uint8_t LUM_96; /*!< Luminance increase for input luminance of 96 256 This parameter can be one value between 0 and 31 */ 257 uint8_t LUM_128; /*!< Luminance increase for input luminance of 128 258 This parameter can be one value between 0 and 31 */ 259 uint8_t LUM_160; /*!< Luminance increase for input luminance of 160 260 This parameter can be one value between 0 and 31 */ 261 uint8_t LUM_192; /*!< Luminance increase for input luminance of 192 262 This parameter can be one value between 0 and 31 */ 263 uint8_t LUM_224; /*!< Luminance increase for input luminance of 224 264 This parameter can be one value between 0 and 31 */ 265 uint8_t LUM_256; /*!< Luminance increase for input luminance of 256 266 This parameter can be one value between 0 and 31 */ 267 } DCMIPP_ContrastConfTypeDef; 268 269 typedef struct 270 { 271 uint32_t VLineStrength; /*!< Strength of the vertical line detection 272 This parameter can be a value from @ref DCMIPP_RAWBayer2RGB_Strength */ 273 uint32_t HLineStrength; /*!< Strength of the horizontal line detection 274 This parameter can be a value from @ref DCMIPP_RAWBayer2RGB_Strength */ 275 uint32_t RawBayerType; /*!< Raw Bayer type 276 This parameter can be a value from @ref DCMIPP_RAWBayer2RGB_Type */ 277 uint32_t PeakStrength; /*!< Strength of the peak detection 278 This parameter can be a value from @ref DCMIPP_RAWBayer2RGB_Strength */ 279 uint32_t EdgeStrength; /*!< Strength of the edge detection 280 This parameter can be a value from @ref DCMIPP_RAWBayer2RGB_Strength */ 281 } DCMIPP_RawBayer2RGBConfTypeDef; 282 283 /** 284 * @brief Color Conversion parameters 285 */ 286 typedef struct 287 { 288 FunctionalState ClampOutputSamples; /*!< Clamp the output samples depending on type 289 This parameter can be ENABLE or DISABLE */ 290 uint8_t OutputSamplesType; /*!< Output samples type used while clamp is activated 291 This parameter can be a value from @ref DCMIPP_OutputSamplesType */ 292 int16_t RR; /*!< Coefficient Row 1 Column 1 of the matrix 293 This parameter can be a value from -1023 to 1023 */ 294 int16_t RG; /*!< Coefficient Row 1 Column 2 of the matrix 295 This parameter can be a value from -1023 to 1023 */ 296 int16_t RB; /*!< Coefficient Row 1 Column 3 of the matrix 297 This parameter can be a value from -511 to 511 */ 298 int16_t RA; /*!< Coefficient Row 1 of the added Column 299 This parameter can be a value from -511 to 511 */ 300 int16_t GR; /*!< Coefficient Row 2 Column 1 of the matrix 301 This parameter can be a value from -1023 to 1023 */ 302 int16_t GG; /*!< Coefficient Row 2 Column 2 of the matrix 303 This parameter can be a value from -1023 to 1023 */ 304 int16_t GB; /*!< Coefficient Row 2 Column 3 of the matrix 305 This parameter can be a value from -511 to 511 */ 306 int16_t GA; /*!< Coefficient Row 2 of the added Column 307 This parameter can be a value from -511 to 511 */ 308 int16_t BR; /*!< Coefficient Row 3 Column 1 of the matrix 309 This parameter can be a value from -1023 to 1023 */ 310 int16_t BG; /*!< Coefficient Row 3 Column 2 of the matrix 311 This parameter can be a value -1023 to 1023 */ 312 int16_t BB; /*!< Coefficient Row 3 Column 3 of the matrix 313 This parameter can be a value from -511 to 511 */ 314 int16_t BA; /*!< Coefficient Row 3 of the added Column 315 This parameter can be a value from -511 to 511 */ 316 } DCMIPP_ColorConversionConfTypeDef; 317 318 /** 319 * @brief Region Of Interest Structure 320 */ 321 typedef struct 322 { 323 uint32_t VStart; /*!< Configures the DCMIPP Region Of Interest Vertical Start 324 This parameter can be one value between 0 and 4095 */ 325 uint32_t HStart; /*!< Configures the DCMIPP Region Of Interest Horizontal Start 326 This parameter can be one value between 0 and 4095 */ 327 uint32_t VSize; /*!< Configures the DCMIPP Region Of Interest Vertical Size 328 This parameter can be one value between 0 and 4095 */ 329 uint32_t HSize; /*!< Configures the DCMIPP Region Of Interest Horizontal Size 330 This parameter can be one value between 0 and 4095 */ 331 uint32_t LineSizeWidth; /*!< Configures the DCMIPP Region Of Interest Line Size Width 332 This parameter can be a value from @ref DCMIPP_Region_Of_Interest_Line_Width */ 333 uint32_t RegionOfInterest; /*!< Configures the DCMIPP Region Of Interest 334 This parameter can be a value from @ref DCMIPP_Region_Of_Interest */ 335 uint8_t ColorLineRed; /*!< Configures the DCMIPP Region Of Interest Line Color : Red Component 336 This parameter can be one value between 0 and 4095 */ 337 uint8_t ColorLineGreen; /*!< Configures the DCMIPP Region Of Interest Line Color : Green Component 338 This parameter can be one value between 0 and 4095 */ 339 uint8_t ColorLineBlue; /*!< Configures the DCMIPP Region Of Interest Line Color : Blue Component 340 This parameter can be one value between 0 and 4095 */ 341 } DCMIPP_RegionOfInterestConfTypeDef; 342 343 /** 344 * @brief Black Level parameters 345 */ 346 typedef struct 347 { 348 uint8_t RedCompBlackLevel; /*!< Black value register to red component 349 This parameter can be one value between 0 and 255 */ 350 uint8_t GreenCompBlackLevel; /*!< Black value register to green component 351 This parameter can be one value between 0 and 255 */ 352 uint8_t BlueCompBlackLevel; /*!< Black value register to blue component 353 This parameter can be one value between 0 and 255 */ 354 } DCMIPP_BlackLevelConfTypeDef; 355 356 /** 357 * @brief HAL DCMIPP 358 */ 359 typedef struct 360 { 361 uint32_t VSize; /*!< Configures the DCMIPP Downsize Vertical Size 362 This parameter can be one value between 0 and 4095 */ 363 uint32_t HSize; /*!< Configures the DCMIPP Downsize Horizontal Size 364 This parameter can be one value between 0 and 4095 */ 365 uint32_t VRatio; /*!< Configures the DCMIPP Downsize Vertical Ratio 366 This parameter can be one value between 0 and 4095 */ 367 uint32_t HRatio; /*!< Configures the DCMIPP Downsize Horizontal Ratio 368 This parameter can be one value between 0 and 4095 */ 369 uint32_t VDivFactor; /*!< Configures the DCMIPP Downsize Vertical Division Factor 370 This parameter can be one value between 0 and 4095 */ 371 uint32_t HDivFactor; /*!< Configures the DCMIPP Downsize Horizontal Division Factor 372 This parameter can be one value between 0 and 4095 */ 373 } DCMIPP_DownsizeTypeDef; 374 375 typedef struct 376 { 377 uint32_t VRatio; /*!< Configures the DCMIPP Downsize Vertical Size 378 This parameter can be a value from @ref DCMIPP_PIPE_Vertical_Decimation_Ratio */ 379 uint32_t HRatio; /*!< Configures the DCMIPP Downsize Vertical Size 380 This parameter can be a value from @ref DCMIPP_PIPE_Horizontal_Decimation_Ratio */ 381 } DCMIPP_DecimationConfTypeDef; 382 383 typedef struct 384 { 385 uint32_t YAddress; /*!< Y Frame Buffer address */ 386 uint32_t UVAddress; /*!< UV Frame Buffer address */ 387 } DCMIPP_SemiPlanarDstAddressTypeDef; 388 389 typedef struct 390 { 391 uint32_t YAddress; /*!< Y Frame Buffer address */ 392 uint32_t UAddress; /*!< U Frame Buffer address */ 393 uint32_t VAddress; /*!< V Frame Buffer address */ 394 } DCMIPP_FullPlanarDstAddressTypeDef; 395 396 /** 397 * @brief HAL DCMIPP State enumeration definition 398 */ 399 typedef enum 400 { 401 HAL_DCMIPP_STATE_RESET = 0x00U, /*!< DCMIPP not yet initialized or disabled */ 402 HAL_DCMIPP_STATE_INIT = 0x01U, /*!< DCMIPP initialized */ 403 HAL_DCMIPP_STATE_READY = 0x02U, /*!< DCMIPP configured and ready for use */ 404 HAL_DCMIPP_STATE_BUSY = 0x03U, /*!< DCMIPP internal processing is ongoing */ 405 HAL_DCMIPP_STATE_ERROR = 0x04U, /*!< DCMIPP state error */ 406 } HAL_DCMIPP_StateTypeDef; 407 408 /** 409 * @brief HAL DCMIPP Pipe State enumeration definition 410 */ 411 412 typedef enum 413 { 414 HAL_DCMIPP_PIPE_STATE_RESET = 0x00U, /*!< DCMIPP Pipe not yet initialized or disabled */ 415 HAL_DCMIPP_PIPE_STATE_READY = 0x01U, /*!< DCMIPP Pipe initialized and ready for use */ 416 HAL_DCMIPP_PIPE_STATE_BUSY = 0x02U, /*!< DCMIPP internal processing is ongoing */ 417 HAL_DCMIPP_PIPE_STATE_SUSPEND = 0x03U, /*!< DCMIPP pipe process is suspended */ 418 HAL_DCMIPP_PIPE_STATE_ERROR = 0x04U, /*!< DCMIPP pipe error state */ 419 } HAL_DCMIPP_PipeStateTypeDef; 420 421 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 422 /** 423 * @brief HAL DCMIPP common Callback ID enumeration definition 424 */ 425 typedef enum 426 { 427 HAL_DCMIPP_MSPINIT_CB_ID = 0x00U, /*!< DCMIPP MspInit callback ID */ 428 HAL_DCMIPP_MSPDEINIT_CB_ID = 0x01U, /*!< DCMIPP MspDeInit callback ID */ 429 HAL_DCMIPP_ERROR_CB_ID = 0x02U, /*!< DCMIPP Error callback ID */ 430 } HAL_DCMIPP_CallbackIDTypeDef; 431 432 /** 433 * @brief HAL DCMIPP pipe Callback ID enumeration definition 434 */ 435 typedef enum 436 { 437 HAL_DCMIPP_PIPE_LIMIT_EVENT_CB_ID = 0x01U, /*!< DCMIPP Pipe Limit event callback ID */ 438 HAL_DCMIPP_PIPE_LINE_EVENT_CB_ID = 0x02U, /*!< DCMIPP Pipe Line event callback ID */ 439 HAL_DCMIPP_PIPE_FRAME_EVENT_CB_ID = 0x03U, /*!< DCMIPP Pipe Frame event callback ID */ 440 HAL_DCMIPP_PIPE_VSYNC_EVENT_CB_ID = 0x04U, /*!< DCMIPP Pipe Vsync event callback ID */ 441 HAL_DCMIPP_PIPE_ERROR_CB_ID = 0x05U, /*!< DCMIPP Pipe Error callback ID */ 442 } HAL_DCMIPP_PIPE_CallbackIDTypeDef; 443 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 444 445 /** 446 * @brief HAL DCMIPP handle structures definition 447 */ 448 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 449 typedef struct __DCMIPP_HandleTypeDef 450 #else 451 typedef struct 452 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 453 { 454 DCMIPP_TypeDef *Instance; /*!< Register the DCMIPP base 455 address */ 456 __IO HAL_DCMIPP_StateTypeDef State; /*!< DCMIPP state */ 457 __IO HAL_DCMIPP_PipeStateTypeDef PipeState[DCMIPP_NUM_OF_PIPES]; /*!< DCMIPP Pipes state */ 458 __IO uint32_t ErrorCode; /*!< DCMIPP Error code */ 459 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 460 void (* PIPE_FrameEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< DCMIPP Pipe Frame Event 461 Callback */ 462 void (* PIPE_VsyncEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< DCMIPP Pipe Vsync Event 463 Callback */ 464 void (* PIPE_LineEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< DCMIPP Pipe Line Event 465 Callback */ 466 void (* PIPE_LimitEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< DCMIPP Pipe Limit Event 467 Callback */ 468 void (* PIPE_ErrorCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< DCMIPP Pipe Error 469 Callback */ 470 void (* ErrorCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp); /*!< DCMIPP Error Callback */ 471 void (* MspInitCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp); /*!< DCMIPP Msp Init 472 Callback */ 473 void (* MspDeInitCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp); /*!< DCMIPP Msp DeInit 474 Callback */ 475 void (* StartOfFrameEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel); /*!< DCMIPP CSI 476 Start Of Frame Event Callback */ 477 void (* EndOfFrameEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel); /*!< DCMIPP CSI 478 End Of Frame Event Callback */ 479 void (* TimerCounterEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Timer); /*!< DCMIPP CSI 480 Timer Counter Event Callback */ 481 void (* LineByteEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter); /*!< DCMIPP CSI Line/Byte 482 Event Callback */ 483 void (* LineErrorCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp, uint32_t DataLane); /*!< DCMIPP CSI Line Error 484 Event Callback */ 485 void (* ClockChangerFifoFullEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp); /*!< DCMIPP CSI Clock changer 486 Fifo Event Callback */ 487 void (* ShortPacketDetectionEventCallback)(struct __DCMIPP_HandleTypeDef *hdcmipp); /*!< DCMIPP CSI Short Packet 488 detection Event Callback */ 489 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 490 } DCMIPP_HandleTypeDef; 491 492 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 493 /** 494 * @brief HAL DCMIPP Callback pointer definition 495 */ 496 typedef void (*pDCMIPP_CallbackTypeDef)(DCMIPP_HandleTypeDef *hdcmipp); /*!< Pointer to a DCMIPP common callback 497 function */ 498 typedef void (*pDCMIPP_PIPE_CallbackTypeDef)(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); /*!< Pointer to a DCMIPP 499 Pipe callback function */ 500 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 501 502 /** 503 * @} 504 */ 505 506 /* Exported constants --------------------------------------------------------*/ 507 508 /** @defgroup DCMIPP_Exported_Constants DCMIPP Exported Constants 509 * @brief DCMIPP Exported constants 510 * @{ 511 */ 512 513 /** @defgroup DCMIPP_Pipes DCMIPP Pipes 514 * @{ 515 */ 516 #define DCMIPP_PIPE0 0U /*!< DCMIPP Pipe0 (Dump pipe) */ 517 #define DCMIPP_PIPE1 1U /*!< DCMIPP Pipe1 (Main Pipe) */ 518 #define DCMIPP_PIPE2 2U /*!< DCMIPP Pipe2 (Ancillary pipe) */ 519 /** 520 * @} 521 */ 522 523 /** @defgroup DCMIPP_Error_Codes DCMIPP Error Codes 524 * @{ 525 */ 526 #define HAL_DCMIPP_ERROR_NONE (0x00000000U) /*!< No error */ 527 #define HAL_DCMIPP_ERROR_AXI_TRANSFER (0x00000001U) /*!< IPPLUG AXI Transfer error */ 528 #define HAL_DCMIPP_ERROR_PARALLEL_SYNC (0x00000002U) /*!< Synchronization error */ 529 #define HAL_DCMIPP_ERROR_PIPE0_LIMIT (0x00000004U) /*!< Limit error on pipe0 */ 530 #define HAL_DCMIPP_ERROR_PIPE0_OVR (0x00000008U) /*!< Overrun error on pipe0 */ 531 #define HAL_DCMIPP_ERROR_PIPE1_OVR (0x00000010U) /*!< Overrun error on pipe1 */ 532 #define HAL_DCMIPP_ERROR_PIPE2_OVR (0x00000020U) /*!< Overrun error on pipe2 */ 533 534 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 535 #define HAL_DCMIPP_ERROR_INVALID_CALLBACK ((uint32_t)0x00000040U) /*!< Invalid Callback error */ 536 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 537 538 #define HAL_DCMIPP_CSI_ERROR_NONE (0x00000080U) /*!< No error */ 539 #define HAL_DCMIPP_CSI_ERROR_SYNC (0x00000100U) /*!< Synchronization error */ 540 #define HAL_DCMIPP_CSI_ERROR_WDG (0x00000200U) /*!< Watchdog Error */ 541 #define HAL_DCMIPP_CSI_ERROR_SPKT (0x00000400U) /*!< Shorter Packet than expected Error */ 542 #define HAL_DCMIPP_CSI_ERROR_DATA_ID (0x00000800U) /*!< Data ID Information Error */ 543 #define HAL_DCMIPP_CSI_ERROR_CECC (0x00001000U) /*!< Corrected ECC Error */ 544 #define HAL_DCMIPP_CSI_ERROR_ECC (0x00002000U) /*!< ECC Error */ 545 #define HAL_DCMIPP_CSI_ERROR_CRC (0x00004000U) /*!< CRC Error */ 546 #define HAL_DCMIPP_CSI_ERROR_DPHY_CTRL (0x00008000U) /*!< Error Control on data line (0 OR 1) */ 547 #define HAL_DCMIPP_CSI_ERROR_DPHY_LP_SYNC (0x00010000U) /*!< Low-Power data transmssion Synchronisation 548 Error on data line (0 OR 1) */ 549 #define HAL_DCMIPP_CSI_ERROR_DPHY_ESCAPE (0x00020000U) /*!< Escape Entry Error on data line (0 OR 1) */ 550 #define HAL_DCMIPP_CSI_ERROR_SOT_SYNC (0x00040000U) /*!< SOT Synchronisation Error on data line(0 OR 1) */ 551 #define HAL_DCMIPP_CSI_ERROR_SOT (0x00080000U) /*!< SOT Error on data line (0 OR 1) */ 552 /** 553 * @} 554 */ 555 556 /** @defgroup DCMIPP_Capture_Mode DCMIPP Capture Mode 557 * @{ 558 */ 559 #define DCMIPP_MODE_CONTINUOUS 0U /*!< DCMIPP continuous mode (preview) */ 560 #define DCMIPP_MODE_SNAPSHOT DCMIPP_P0FCTCR_CPTMODE /*!< DCMIPP snapshot mode */ 561 /** 562 * @} 563 */ 564 565 /** 566 * @defgroup DCMIPP_modes (DCMI or CSI): modes are exclusive 567 * @{ 568 */ 569 #define DCMIPP_PARALLEL_MODE (0x00U << DCMIPP_CMCR_INSEL_Pos) /*!< DCMIPP Parallel (DCMI) mode */ 570 #define DCMIPP_SERIAL_MODE (0x01U << DCMIPP_CMCR_INSEL_Pos) /*!< DCMIPP CSI mode */ 571 /** 572 * @} 573 */ 574 575 /** @defgroup DCMIPP_IPPLUG_Client DCMIPP IPPLUG Client 576 * @{ 577 */ 578 #define DCMIPP_CLIENT1 1U /*!< Client 1 identifier */ 579 #define DCMIPP_CLIENT2 2U /*!< Client 2 identifier */ 580 #define DCMIPP_CLIENT3 3U /*!< Client 3 identifier */ 581 #define DCMIPP_CLIENT4 4U /*!< Client 4 identifier */ 582 #define DCMIPP_CLIENT5 5U /*!< Client 5 identifier */ 583 /** 584 * @} 585 */ 586 587 /** @defgroup DCMIPP_Traffic_Burst_Size DCMIPP Traffic Burst Size 588 * @{ 589 */ 590 #define DCMIPP_TRAFFIC_BURST_SIZE_8BYTES 0U /*!< Traffic Burst size 8 Bytes */ 591 #define DCMIPP_TRAFFIC_BURST_SIZE_16BYTES (0x01U << DCMIPP_IPC1R1_TRAFFIC_Pos) /*!< Traffic Burst size 16 Bytes */ 592 #define DCMIPP_TRAFFIC_BURST_SIZE_32BYTES (0x02U << DCMIPP_IPC1R1_TRAFFIC_Pos) /*!< Traffic Burst size 32 Bytes */ 593 #define DCMIPP_TRAFFIC_BURST_SIZE_64BYTES (0x03U << DCMIPP_IPC1R1_TRAFFIC_Pos) /*!< Traffic Burst size 64 Bytes */ 594 #define DCMIPP_TRAFFIC_BURST_SIZE_128BYTES (0x04U << DCMIPP_IPC1R1_TRAFFIC_Pos) /*!< Traffic Burst size 128 Bytes */ 595 /** 596 * @} 597 */ 598 599 /** @defgroup DCMIPP_Memory_Page_Size DCMIPP Memory Page Size 600 * @{ 601 */ 602 #define DCMIPP_MEMORY_PAGE_SIZE_64BYTES 0U /*!< Memory Page size 64 Bytes */ 603 #define DCMIPP_MEMORY_PAGE_SIZE_128BYTES (0x01U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 128 Bytes */ 604 #define DCMIPP_MEMORY_PAGE_SIZE_256BYTES (0x02U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 256 Bytes */ 605 #define DCMIPP_MEMORY_PAGE_SIZE_512BYTES (0x03U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 512 Bytes */ 606 #define DCMIPP_MEMORY_PAGE_SIZE_1KBYTES (0x04U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 1 Bytes */ 607 #define DCMIPP_MEMORY_PAGE_SIZE_2KBYTES (0x05U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 2 Bytes */ 608 #define DCMIPP_MEMORY_PAGE_SIZE_4KBYTES (0x06U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 4 Bytes */ 609 #define DCMIPP_MEMORY_PAGE_SIZE_8KBYTES (0x07U << DCMIPP_IPGR1_MEMORYPAGE_Pos) /*!< Memory Page size 8 Bytes */ 610 /** 611 * @} 612 */ 613 /** @defgroup DCMIPP_Maximum_Outstanding_Transactions DCMIPP Maximum Outstanding Transactions 614 * @{ 615 */ 616 #define DCMIPP_OUTSTANDING_TRANSACTION_NONE 0U /*!< Nooutstanding transaction limitation*/ 617 #define DCMIPP_OUTSTANDING_TRANSACTION_2 0x01U /*!< Two outstanding transactions */ 618 #define DCMIPP_OUTSTANDING_TRANSACTION_3 0x02U /*!< Three outstanding transactions */ 619 #define DCMIPP_OUTSTANDING_TRANSACTION_4 0x03U /*!< Four outstanding transactions */ 620 #define DCMIPP_OUTSTANDING_TRANSACTION_5 0x04U /*!< 5 outstanding transactions */ 621 #define DCMIPP_OUTSTANDING_TRANSACTION_6 0x05U /*!< 6 outstanding transactions */ 622 #define DCMIPP_OUTSTANDING_TRANSACTION_7 0x06U /*!< 7 outstanding transactions */ 623 #define DCMIPP_OUTSTANDING_TRANSACTION_8 0x07U /*!< 8 outstanding transactions */ 624 #define DCMIPP_OUTSTANDING_TRANSACTION_9 0x08U /*!< 9 outstanding transactions */ 625 #define DCMIPP_OUTSTANDING_TRANSACTION_10 0x09U /*!< 10 outstanding transactions */ 626 #define DCMIPP_OUTSTANDING_TRANSACTION_11 0x0AU /*!< 11 outstanding transactions */ 627 #define DCMIPP_OUTSTANDING_TRANSACTION_12 0x0BU /*!< 12 outstanding transactions */ 628 #define DCMIPP_OUTSTANDING_TRANSACTION_13 0x0CU /*!< 13 outstanding transactions */ 629 #define DCMIPP_OUTSTANDING_TRANSACTION_14 0x0DU /*!< 14 outstanding transactions */ 630 #define DCMIPP_OUTSTANDING_TRANSACTION_15 0x0EU /*!< 15 outstanding transactions */ 631 #define DCMIPP_OUTSTANDING_TRANSACTION_16 0x0FU /*!< 16 outstanding transactions */ 632 /** 633 * @} 634 */ 635 636 /** @defgroup DCMIPP_Frame_Rates DCMIPP Frame Rates 637 * @{ 638 */ 639 #define DCMIPP_FRAME_RATE_ALL 0U /*!< All frames captured */ 640 #define DCMIPP_FRAME_RATE_1_OVER_2 (1U << DCMIPP_P0FCTCR_FRATE_Pos) /*!< 1 frame over 2 captured */ 641 #define DCMIPP_FRAME_RATE_1_OVER_4 (2U << DCMIPP_P0FCTCR_FRATE_Pos) /*!< 1 frame over 4 captured */ 642 #define DCMIPP_FRAME_RATE_1_OVER_8 (3U << DCMIPP_P0FCTCR_FRATE_Pos) /*!< 1 frame over 8 captured */ 643 /** 644 * @} 645 */ 646 647 /** @defgroup DCMIPP_Crop_Area DCMIPP Crop Area 648 * @{ 649 */ 650 #define DCMIPP_POSITIVE_AREA 0U /*!< Positive Area chosen for crop */ 651 #define DCMIPP_NEGATIVE_AREA DCMIPP_P0SCSZR_POSNEG /*!< Negative Area chosen for crop */ 652 /** 653 * @} 654 */ 655 656 /** @defgroup DCMIPP_Virtual_Channel DCMIPP Virtual Channel 657 * @{ 658 */ 659 #define DCMIPP_VIRTUAL_CHANNEL0 0U /*!< DCMIPP Virtual Channel 0 */ 660 #define DCMIPP_VIRTUAL_CHANNEL1 1U /*!< DCMIPP Virtual Channel 1 */ 661 #define DCMIPP_VIRTUAL_CHANNEL2 2U /*!< DCMIPP Virtual Channel 2 */ 662 #define DCMIPP_VIRTUAL_CHANNEL3 3U /*!< DCMIPP Virtual Channel 3 */ 663 /** 664 * @} 665 */ 666 667 /** @defgroup DCMIPP_DataTypeMode DCMIPP DCMIPP Data Type Mode 668 * @{ 669 */ 670 #define DCMIPP_DTMODE_DTIDA (0U << DCMIPP_P0FSCR_DTMODE_Pos) /*!< Only flow DTIDA from the selected VC 671 is forwarded in the pipe */ 672 #define DCMIPP_DTMODE_DTIDA_OR_DTIDB (1U << DCMIPP_P0FSCR_DTMODE_Pos) /*!< Flows DTIDA and/or DTIDB from the 673 selected VC are forwarded in the pipe */ 674 #define DCMIPP_DTMODE_ALL_EXCEPT_DTIA_DTIB (2U << DCMIPP_P0FSCR_DTMODE_Pos) /*!< All data types from the selected VC 675 (except the DTIDA or DTIDB) are 676 forwarded in the pipe, 677 only for Pipe0 */ 678 #define DCMIPP_DTMODE_ALL (3U << DCMIPP_P0FSCR_DTMODE_Pos) /*!< All data types of the selected virtual 679 channel VC are forwarded in the pipe, 680 only for Pipe0 */ 681 /** 682 * @} 683 */ 684 685 /** @defgroup DCMIPP_DataTypeSelection DCMIPP Data Type Selection 686 * @{ 687 */ 688 #define DCMIPP_DTSELECT_IDA DCMIPP_P0FSCR_DTIDA_Pos /*!< Data type selection ID A */ 689 #define DCMIPP_DTSELECT_IDB DCMIPP_P0FSCR_DTIDB_Pos /*!< Data type selection ID B */ 690 691 /** 692 * @} 693 */ 694 695 /** @defgroup DCMIPP_DataType DCMIPP Data Type 696 * @{ 697 */ 698 #define DCMIPP_DT_YUV420_8 0x18U /*!< DCMIPP Data Type YUV420 8bit */ 699 #define DCMIPP_DT_YUV420_10 0x19U /*!< DCMIPP Data Type YUV420 8bit */ 700 #define DCMIPP_DT_YUV422_8 0x1EU /*!< DCMIPP Data Type YUV422 8bit */ 701 #define DCMIPP_DT_YUV422_10 0x1FU /*!< DCMIPP Data Type YUV422 10bit */ 702 #define DCMIPP_DT_RGB444 0x20U /*!< DCMIPP Data Type RGB444 */ 703 #define DCMIPP_DT_RGB555 0x21U /*!< DCMIPP Data Type RGB555 */ 704 #define DCMIPP_DT_RGB565 0x22U /*!< DCMIPP Data Type RGB565 */ 705 #define DCMIPP_DT_RGB666 0x23U /*!< DCMIPP Data Type RGB666 */ 706 #define DCMIPP_DT_RGB888 0x24U /*!< DCMIPP Data Type RGB888 */ 707 #define DCMIPP_DT_RAW8 0x2AU /*!< DCMIPP Data Type RawBayer8 */ 708 #define DCMIPP_DT_RAW10 0x2BU /*!< DCMIPP Data Type RawBayer10 */ 709 #define DCMIPP_DT_RAW12 0x2CU /*!< DCMIPP Data Type RawBayer12 */ 710 #define DCMIPP_DT_RAW14 0x2DU /*!< DCMIPP Data Type RawBayer14 */ 711 /** 712 * @} 713 */ 714 /** @defgroup DCMIPP_CSI_DataTypeID DCMIPP CSI Data Type ID 715 * @{ 716 */ 717 #define DCMIPP_CSI_DT1 1U /*!< DCMIPP Data Type ID 1 */ 718 #define DCMIPP_CSI_DT2 2U /*!< DCMIPP Data Type ID 2 */ 719 #define DCMIPP_CSI_DT3 3U /*!< DCMIPP Data Type ID 3 */ 720 #define DCMIPP_CSI_DT4 4U /*!< DCMIPP Data Type ID 4 */ 721 #define DCMIPP_CSI_DT5 5U /*!< DCMIPP Data Type ID 5 */ 722 #define DCMIPP_CSI_DT6 6U /*!< DCMIPP Data Type ID 6 */ 723 #define DCMIPP_CSI_DT7 7U /*!< DCMIPP Data Type ID 7 */ 724 /** 725 * @} 726 */ 727 728 /** @defgroup DCMIPP_CSI_Number_Of_Lanes DCMIPP CSI Number Of Lanes 729 * @{ 730 */ 731 #define DCMIPP_CSI_ONE_DATA_LANE (1U << CSI_LMCFGR_LANENB_Pos) /*!< DCMIPP CSI One Data Lane */ 732 #define DCMIPP_CSI_TWO_DATA_LANES (2U << CSI_LMCFGR_LANENB_Pos) /*!< DCMIPP CSI 2 Data Lanes */ 733 /** 734 * @} 735 */ 736 /** @defgroup DCMIPP_CSI_DataLaneMapping DCMIPP CSI Data Lane Mapping 737 * @{ 738 */ 739 #define DCMIPP_CSI_PHYSICAL_DATA_LANES 1U /*!< Physical data lane 0 connected to logical data lane 0 and 740 Physical data lane 1 connected to logical data lane 1 */ 741 #define DCMIPP_CSI_INVERTED_DATA_LANES 2U /*!< Physical data lane 1 connected to logical data lane 0 and 742 Physical data lane 0 connected to logical data lane 1 */ 743 /** 744 * @} 745 */ 746 747 /** @defgroup DCMIPP_CSI_DataLane DCMIPP CSI Data Lane 748 * @{ 749 */ 750 #define DCMIPP_CSI_DATA_LANE0 1U /*!< DCMIPP CSI Data Lane 0 */ 751 #define DCMIPP_CSI_DATA_LANE1 2U /*!< DCMIPP CSI Data Lane 1 */ 752 /** 753 * @} 754 */ 755 /** @defgroup DCMIPP_CSI_Timer_StartPoint DCMIPP CSI Timer StartPoint 756 * @{ 757 */ 758 #define DCMIPP_CSI_TIMER_START_SOF 0U /*!< DCMIPP CSI Start timer counter at Start Of Frame */ 759 #define DCMIPP_CSI_TIMER_START_EOF 1U /*!< DCMIPP CSI Start timer counter at End Of Frame */ 760 /** 761 * @} 762 */ 763 /** @defgroup DCMIPP_CSI_DataTypeFormat DCMIPP CSI Data Type Format 764 * @{ 765 */ 766 #define DCMIPP_CSI_DT_BPP6 0U /*!< DCMIPP CSI Data Type Format 6 bit words */ 767 #define DCMIPP_CSI_DT_BPP7 1U /*!< DCMIPP CSI Data Type Format 7 bit words */ 768 #define DCMIPP_CSI_DT_BPP8 2U /*!< DCMIPP CSI Data Type Format 8 bit words */ 769 #define DCMIPP_CSI_DT_BPP10 3U /*!< DCMIPP CSI Data Type Format 10 bit words */ 770 #define DCMIPP_CSI_DT_BPP12 4U /*!< DCMIPP CSI Data Type Format 12 bit words */ 771 #define DCMIPP_CSI_DT_BPP14 5U /*!< DCMIPP CSI Data Type Format 14 bit words */ 772 #define DCMIPP_CSI_DT_BPP16 6U /*!< DCMIPP CSI Data Type Format 16 bit words */ 773 /** 774 * @} 775 */ 776 /** @defgroup DCMIPP_CSI_Timer DCMIPP CSI Timer 777 * @{ 778 */ 779 #define DCMIPP_CSI_TIMER0 0U /*!< DCMIPP CSI Timer0 */ 780 #define DCMIPP_CSI_TIMER1 1U /*!< DCMIPP CSI Timer1 */ 781 #define DCMIPP_CSI_TIMER2 2U /*!< DCMIPP CSI Timer2 */ 782 #define DCMIPP_CSI_TIMER3 3U /*!< DCMIPP CSI Timer3 */ 783 /** 784 * @} 785 */ 786 /** @defgroup DCMIPP_CSI_Counter DCMIPP CSI Counter 787 * @{ 788 */ 789 #define DCMIPP_CSI_COUNTER0 0U /*!< DCMIPP CSI Counter 0 */ 790 #define DCMIPP_CSI_COUNTER1 1U /*!< DCMIPP CSI Counter 1 */ 791 #define DCMIPP_CSI_COUNTER2 2U /*!< DCMIPP CSI Counter 2 */ 792 #define DCMIPP_CSI_COUNTER3 3U /*!< DCMIPP CSI Counter 3 */ 793 /** 794 * @} 795 */ 796 /** 797 * @defgroup DCMIPP_CSI_PHYBitRate DCMIPP CSI PHY BitRate 798 * @{ 799 */ 800 #define DCMIPP_CSI_PHY_BT_80 0U /*!< PHY BitRate 80 */ 801 #define DCMIPP_CSI_PHY_BT_90 1U /*!< PHY BitRate 90 */ 802 #define DCMIPP_CSI_PHY_BT_100 2U /*!< PHY BitRate 100 */ 803 #define DCMIPP_CSI_PHY_BT_110 3U /*!< PHY BitRate 110 */ 804 #define DCMIPP_CSI_PHY_BT_120 4U /*!< PHY BitRate 120 */ 805 #define DCMIPP_CSI_PHY_BT_130 5U /*!< PHY BitRate 130 */ 806 #define DCMIPP_CSI_PHY_BT_140 6U /*!< PHY BitRate 140 */ 807 #define DCMIPP_CSI_PHY_BT_150 7U /*!< PHY BitRate 150 */ 808 #define DCMIPP_CSI_PHY_BT_160 8U /*!< PHY BitRate 160 */ 809 #define DCMIPP_CSI_PHY_BT_170 9U /*!< PHY BitRate 170 */ 810 #define DCMIPP_CSI_PHY_BT_180 10U /*!< PHY BitRate 180 */ 811 #define DCMIPP_CSI_PHY_BT_190 11U /*!< PHY BitRate 190 */ 812 #define DCMIPP_CSI_PHY_BT_205 12U /*!< PHY BitRate 205 */ 813 #define DCMIPP_CSI_PHY_BT_220 13U /*!< PHY BitRate 220 */ 814 #define DCMIPP_CSI_PHY_BT_235 14U /*!< PHY BitRate 235 */ 815 #define DCMIPP_CSI_PHY_BT_250 15U /*!< PHY BitRate 250 */ 816 #define DCMIPP_CSI_PHY_BT_275 16U /*!< PHY BitRate 275 */ 817 #define DCMIPP_CSI_PHY_BT_300 17U /*!< PHY BitRate 300 */ 818 #define DCMIPP_CSI_PHY_BT_325 18U /*!< PHY BitRate 325 */ 819 #define DCMIPP_CSI_PHY_BT_350 19U /*!< PHY BitRate 350 */ 820 #define DCMIPP_CSI_PHY_BT_400 20U /*!< PHY BitRate 400 */ 821 #define DCMIPP_CSI_PHY_BT_450 21U /*!< PHY BitRate 450 */ 822 #define DCMIPP_CSI_PHY_BT_500 22U /*!< PHY BitRate 500 */ 823 #define DCMIPP_CSI_PHY_BT_550 23U /*!< PHY BitRate 550 */ 824 #define DCMIPP_CSI_PHY_BT_600 24U /*!< PHY BitRate 600 */ 825 #define DCMIPP_CSI_PHY_BT_650 25U /*!< PHY BitRate 650 */ 826 #define DCMIPP_CSI_PHY_BT_700 26U /*!< PHY BitRate 700 */ 827 #define DCMIPP_CSI_PHY_BT_750 27U /*!< PHY BitRate 750 */ 828 #define DCMIPP_CSI_PHY_BT_800 28U /*!< PHY BitRate 800 */ 829 #define DCMIPP_CSI_PHY_BT_850 29U /*!< PHY BitRate 850 */ 830 #define DCMIPP_CSI_PHY_BT_900 30U /*!< PHY BitRate 900 */ 831 #define DCMIPP_CSI_PHY_BT_950 31U /*!< PHY BitRate 950 */ 832 #define DCMIPP_CSI_PHY_BT_1000 32U /*!< PHY BitRate 1000 */ 833 #define DCMIPP_CSI_PHY_BT_1050 33U /*!< PHY BitRate 1050 */ 834 #define DCMIPP_CSI_PHY_BT_1100 34U /*!< PHY BitRate 1100 */ 835 #define DCMIPP_CSI_PHY_BT_1150 35U /*!< PHY BitRate 1150 */ 836 #define DCMIPP_CSI_PHY_BT_1200 36U /*!< PHY BitRate 1200 */ 837 #define DCMIPP_CSI_PHY_BT_1250 37U /*!< PHY BitRate 1250 */ 838 #define DCMIPP_CSI_PHY_BT_1300 38U /*!< PHY BitRate 1300 */ 839 #define DCMIPP_CSI_PHY_BT_1350 39U /*!< PHY BitRate 1350 */ 840 #define DCMIPP_CSI_PHY_BT_1400 40U /*!< PHY BitRate 1400 */ 841 #define DCMIPP_CSI_PHY_BT_1450 41U /*!< PHY BitRate 1450 */ 842 #define DCMIPP_CSI_PHY_BT_1500 42U /*!< PHY BitRate 1500 */ 843 #define DCMIPP_CSI_PHY_BT_1550 43U /*!< PHY BitRate 1550 */ 844 #define DCMIPP_CSI_PHY_BT_1600 44U /*!< PHY BitRate 1600 */ 845 #define DCMIPP_CSI_PHY_BT_1650 45U /*!< PHY BitRate 1650 */ 846 #define DCMIPP_CSI_PHY_BT_1700 46U /*!< PHY BitRate 1700 */ 847 #define DCMIPP_CSI_PHY_BT_1750 47U /*!< PHY BitRate 1750 */ 848 #define DCMIPP_CSI_PHY_BT_1800 48U /*!< PHY BitRate 1800 */ 849 #define DCMIPP_CSI_PHY_BT_1850 49U /*!< PHY BitRate 1850 */ 850 #define DCMIPP_CSI_PHY_BT_1900 50U /*!< PHY BitRate 1900 */ 851 #define DCMIPP_CSI_PHY_BT_1950 51U /*!< PHY BitRate 1950 */ 852 #define DCMIPP_CSI_PHY_BT_2000 52U /*!< PHY BitRate 2000 */ 853 #define DCMIPP_CSI_PHY_BT_2050 53U /*!< PHY BitRate 2050 */ 854 #define DCMIPP_CSI_PHY_BT_2100 54U /*!< PHY BitRate 2100 */ 855 #define DCMIPP_CSI_PHY_BT_2150 55U /*!< PHY BitRate 2150 */ 856 #define DCMIPP_CSI_PHY_BT_2200 56U /*!< PHY BitRate 2200 */ 857 #define DCMIPP_CSI_PHY_BT_2250 57U /*!< PHY BitRate 2250 */ 858 #define DCMIPP_CSI_PHY_BT_2300 58U /*!< PHY BitRate 2300 */ 859 #define DCMIPP_CSI_PHY_BT_2350 59U /*!< PHY BitRate 2350 */ 860 #define DCMIPP_CSI_PHY_BT_2400 60U /*!< PHY BitRate 2400 */ 861 #define DCMIPP_CSI_PHY_BT_2450 61U /*!< PHY BitRate 2450 */ 862 #define DCMIPP_CSI_PHY_BT_2500 62U /*!< PHY BitRate 2500 */ 863 /** 864 * @} 865 */ 866 867 /** @defgroup DCMIPP_OutputSamplesType DCMIPP OutputSamplesType 868 * @{ 869 */ 870 #define DCMIPP_CLAMP_YUV (0x0U << DCMIPP_P1CCCR_TYPE_Pos) /*!< Output samples type : Clamped to [16;235] for Y and 871 to [16;240] for U and V */ 872 #define DCMIPP_CLAMP_RGB (0x1U << DCMIPP_P1CCCR_TYPE_Pos) /*!< Output samples type:Clamped to [16;235] for R, G and B */ 873 /** 874 * @} 875 */ 876 /** @defgroup DCMIPP_Format DCMIPP Format 877 * @{ 878 */ 879 #define DCMIPP_FORMAT_BYTE 0U /*!< DCMIPP Format BYTE */ 880 #define DCMIPP_FORMAT_YUV422 (0x1EU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format YUV422 */ 881 #define DCMIPP_FORMAT_RGB565 (0x22U << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RGB565 */ 882 #define DCMIPP_FORMAT_RGB666 (0x23U << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RGB666 */ 883 #define DCMIPP_FORMAT_RGB888 (0x24U << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RGB888 */ 884 #define DCMIPP_FORMAT_RAW8 (0x2AU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RAW8 */ 885 #define DCMIPP_FORMAT_RAW10 (0x2BU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RAW10 */ 886 #define DCMIPP_FORMAT_RAW12 (0x2CU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RAW12 */ 887 #define DCMIPP_FORMAT_RAW14 (0x2DU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format RAW14 */ 888 #define DCMIPP_FORMAT_MONOCHROME_8B (0x4AU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format 8-bits */ 889 #define DCMIPP_FORMAT_MONOCHROME_10B (0x4BU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format 10-bits */ 890 #define DCMIPP_FORMAT_MONOCHROME_12B (0x4CU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format 12-bits */ 891 #define DCMIPP_FORMAT_MONOCHROME_14B (0x4DU << DCMIPP_PRCR_FORMAT_Pos) /*!< DCMIPP Format 14-bits */ 892 /** 893 * @} 894 */ 895 896 /** @defgroup DCMIPP_Extended_Data_Mode DCMIPP Extended Data Mode 897 * @{ 898 */ 899 #define DCMIPP_INTERFACE_8BITS 0U /*!< Interface captures 8bits on every pixel clock */ 900 #define DCMIPP_INTERFACE_10BITS (1U << DCMIPP_PRCR_EDM_Pos) /*!< Interface captures 10bits on every pixel clock */ 901 #define DCMIPP_INTERFACE_12BITS (2U << DCMIPP_PRCR_EDM_Pos) /*!< Interface captures 12bits on every pixel clock */ 902 #define DCMIPP_INTERFACE_14BITS (3U << DCMIPP_PRCR_EDM_Pos) /*!< Interface captures 14bits on every pixel clock */ 903 #define DCMIPP_INTERFACE_16BITS (4U << DCMIPP_PRCR_EDM_Pos) /*!< Interface captures 16bits on every pixel clock */ 904 /** 905 * @} 906 */ 907 908 /** @defgroup DCMIPP_HSYNC_Polarity DCMIPP HSYNC Polarity 909 * @{ 910 */ 911 #define DCMIPP_HSPOLARITY_LOW 0U /*!< Horizontal synchronization active Low */ 912 #define DCMIPP_HSPOLARITY_HIGH DCMIPP_PRCR_HSPOL /*!< Horizontal synchronization active High */ 913 /** 914 * @} 915 */ 916 /** @defgroup DCMIPP_VSYNC_Polarity DCMIPP VSYNC Polarity 917 * @{ 918 */ 919 #define DCMIPP_VSPOLARITY_LOW 0U /*!< Vertical synchronization active Low */ 920 #define DCMIPP_VSPOLARITY_HIGH DCMIPP_PRCR_VSPOL /*!< Vertical synchronization active High */ 921 /** 922 * @} 923 */ 924 /** @defgroup DCMIPP_PIXCK_Polarity DCMIPP PIXCK Polarity 925 * @{ 926 */ 927 #define DCMIPP_PCKPOLARITY_FALLING 0U /*!< Pixel clock active on Falling edge */ 928 #define DCMIPP_PCKPOLARITY_RISING DCMIPP_PRCR_PCKPOL /*!< Pixel clock active on Rising edge */ 929 /** 930 * @} 931 */ 932 933 /** @defgroup DCMIPP_Synchronization_Mode DCMIPP Synchronization Mode 934 * @{ 935 */ 936 #define DCMIPP_SYNCHRO_HARDWARE 0U /*!< Hardware Synchronization */ 937 #define DCMIPP_SYNCHRO_EMBEDDED DCMIPP_PRCR_ESS /*!< Embedded Synchronization */ 938 /** 939 * @} 940 */ 941 /** @defgroup DCMIPP_SWAP_COMPONENT DCMIPP Swap Component 942 * @{ 943 */ 944 #define DCMIPP_SWAP_COMPONENT_DISABLE 0U /*!< Disable Swap R/U and B/V */ 945 #define DCMIPP_SWAP_COMPONENT_ENABLE (DCMIPP_CMCR_SWAPRB) /*!< Enable Swap R/U and B/V */ 946 /** 947 * @} 948 */ 949 950 /** @defgroup DCMIPP_SWAP_CYCLES DCMIPP Swap Cycles 951 * @{ 952 */ 953 #define DCMIPP_SWAPCYCLES_DISABLE 0U /*!< swap data from cycle 0 vs cycle 1 */ 954 #define DCMIPP_SWAPCYCLES_ENABLE (DCMIPP_PRCR_SWAPCYCLES) /*!< swap data from cycle 0 vs cycle 1 */ 955 /** 956 * @} 957 */ 958 959 /** @defgroup DCMIPP_SWAP_BITS DCMIPP Swap Bits 960 * @{ 961 */ 962 #define DCMIPP_SWAPBITS_DISABLE 0U /*!< swap lsb vs msb within each received component */ 963 #define DCMIPP_SWAPBITS_ENABLE (DCMIPP_PRCR_SWAPBITS) /*!< swap lsb vs msb within each received component */ 964 /** 965 * @} 966 */ 967 968 /** @defgroup DCMIPP_Pipe_Line_Decimation DCMIPP Pipe Line Decimation 969 * @{ 970 */ 971 /** @defgroup DCMIPP_Line_Select_Mode DCMIPP Line Select Mode 972 * @{ 973 */ 974 #define DCMIPP_LSM_ALL 0U /*!< Interface captures all received lines */ 975 #define DCMIPP_LSM_ALTERNATE_2 (1U << DCMIPP_P0PPCR_LSM_Pos ) /*!< Interface captures one line out of two */ 976 /** 977 * @} 978 */ 979 /** @defgroup DCMIPP_Line_Start_Mode DCMIPP Line Start Mode 980 * @{ 981 */ 982 #define DCMIPP_OELS_ODD 0U /*!< Interface captures first line from the frame start, 983 second one is dropped */ 984 #define DCMIPP_OELS_EVEN (1U << DCMIPP_P0PPCR_OELS_Pos) /*!< Interface captures second line from the frame 985 start, first one is dropped */ 986 /** 987 * @} 988 */ 989 /** 990 * @} 991 */ 992 993 /** @defgroup DCMIPP_Pipe_Byte_Decimation DCMIPP Pipe Byte Decimation 994 * @{ 995 */ 996 /** @defgroup DCMIPP_Byte_Select_Mode DCMIPP Byte Select Mode 997 * @{ 998 */ 999 #define DCMIPP_BSM_ALL 0U /*!< Interface captures all received data */ 1000 #define DCMIPP_BSM_DATA_OUT_2 (1U << DCMIPP_P0PPCR_BSM_Pos) /*!< Interface captures 1 data out of 2 */ 1001 #define DCMIPP_BSM_BYTE_OUT_4 (2U << DCMIPP_P0PPCR_BSM_Pos) /*!< Interface captures 1 byte out of 4 */ 1002 #define DCMIPP_BSM_2BYTE_OUT_4 (3U << DCMIPP_P0PPCR_BSM_Pos) /*!< Interface captures 2 byte out of 4 */ 1003 /** 1004 * @} 1005 */ 1006 /** @defgroup DCMIPP_Byte_Start_Mode DCMIPP Byte Start Mode 1007 * @{ 1008 */ 1009 #define DCMIPP_OEBS_ODD 0U /*!< Interface captures first data (byte or double byte) 1010 from the frame/line start,second one being dropped */ 1011 #define DCMIPP_OEBS_EVEN (1U << DCMIPP_P0PPCR_OEBS_Pos) /*!< Interface captures second data (byte or double byte) 1012 from the frame/line start, first one is dropped */ 1013 /** 1014 * @} 1015 */ 1016 /** 1017 * @} 1018 */ 1019 1020 /** @defgroup DCMIPP_Memory DCMIPP Memory 1021 * @{ 1022 */ 1023 #define DCMIPP_MEMORY_ADDRESS_0 0U /*!< Base destination address */ 1024 #define DCMIPP_MEMORY_ADDRESS_1 1U /*!< Second destination address */ 1025 /** 1026 * @} 1027 */ 1028 /** @defgroup DCMIPP_LineMult DCMIPP Line Mult 1029 * @{ 1030 */ 1031 #define DCMIPP_MULTILINE_1_LINE 0U /*!< Event after every 1 line */ 1032 #define DCMIPP_MULTILINE_2_LINES (1U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 2 lines */ 1033 #define DCMIPP_MULTILINE_4_LINES (2U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 4 lines */ 1034 #define DCMIPP_MULTILINE_8_LINES (3U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 8 lines */ 1035 #define DCMIPP_MULTILINE_16_LINES (4U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 16 lines */ 1036 #define DCMIPP_MULTILINE_32_LINES (5U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 32 lines */ 1037 #define DCMIPP_MULTILINE_64_LINES (6U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 64 lines */ 1038 #define DCMIPP_MULTILINE_128_LINES (7U << DCMIPP_P0PPCR_LINEMULT_Pos) /*!< Event after every 128 lines */ 1039 /** 1040 * @} 1041 */ 1042 /** @defgroup DCMIPP_LineWrapAddress DCMIPP line Wrap Address 1043 * @{ 1044 */ 1045 #define DCMIPP_WRAP_ADDRESS_1_LINE (0U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 1 line */ 1046 #define DCMIPP_WRAP_ADDRESS_2_LINES (1U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 2 lines */ 1047 #define DCMIPP_WRAP_ADDRESS_4_LINES (2U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 4 lines */ 1048 #define DCMIPP_WRAP_ADDRESS_8_LINES (3U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 8 lines */ 1049 #define DCMIPP_WRAP_ADDRESS_16_LINES (4U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 16 lines */ 1050 #define DCMIPP_WRAP_ADDRESS_32_LINES (5U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 32 lines */ 1051 #define DCMIPP_WRAP_ADDRESS_64_LINES (6U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 64 lines */ 1052 #define DCMIPP_WRAP_ADDRESS_128_LINES (7U << DCMIPP_P1PPCR_LMAWM_Pos) /*!< Wraps address after 128 lines */ 1053 /** 1054 * @} 1055 */ 1056 1057 /** @defgroup DCMIPP_PIPE_Vertical_Decimation_Ratio DCMIPP Pipe Vertical Decimation Ratio 1058 * @{ 1059 */ 1060 1061 #define DCMIPP_VDEC_ALL 0U /*!< All lines captured , no vertical decimation */ 1062 #define DCMIPP_VDEC_1_OUT_2 (1U << DCMIPP_P1DECR_VDEC_Pos) /*!< One line out of two transmitted */ 1063 #define DCMIPP_VDEC_1_OUT_4 (2U << DCMIPP_P1DECR_VDEC_Pos) /*!< One line out of four transmitted */ 1064 #define DCMIPP_VDEC_1_OUT_8 (3U << DCMIPP_P1DECR_VDEC_Pos) /*!< One line out of eight transmitted */ 1065 1066 /** 1067 * @} 1068 */ 1069 1070 /** @defgroup DCMIPP_PIPE_Horizontal_Decimation_Ratio DCMIPP Pipe Horizontal Decimation Ratio 1071 * @{ 1072 */ 1073 #define DCMIPP_HDEC_ALL 0U /*!< All pixels captured , no horizontal decimation */ 1074 #define DCMIPP_HDEC_1_OUT_2 (1U << DCMIPP_P1DECR_HDEC_Pos) /*!< One line out of two transmitted */ 1075 #define DCMIPP_HDEC_1_OUT_4 (2U << DCMIPP_P1DECR_HDEC_Pos) /*!< One line out of four transmitted */ 1076 #define DCMIPP_HDEC_1_OUT_8 (3U << DCMIPP_P1DECR_HDEC_Pos) /*!< One line out of eight transmitted */ 1077 /** 1078 * @} 1079 */ 1080 1081 /** @defgroup DCMIPP_Pixel_Packer_Format DCMIPP Pixel Packer Format 1082 * @{ 1083 */ 1084 #define DCMIPP_PIXEL_PACKER_FORMAT_RGB888_YUV444_1 0U /*!< RGB888 or YUV422 1-buffer*/ 1085 #define DCMIPP_PIXEL_PACKER_FORMAT_RGB565_1 (1U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< RGB565 1-buffer */ 1086 #define DCMIPP_PIXEL_PACKER_FORMAT_ARGB8888 (2U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< ARGB888 A=0xff */ 1087 #define DCMIPP_PIXEL_PACKER_FORMAT_RGBA888 (3U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< RGBA888 A=0xff) */ 1088 #define DCMIPP_PIXEL_PACKER_FORMAT_MONO_Y8_G8_1 (4U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< Monochrome Y8 or G8 */ 1089 #define DCMIPP_PIXEL_PACKER_FORMAT_YUV444_1 (5U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< YUV444 1-buffer 32bpp 1090 A=0xff) */ 1091 #define DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1 (6U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< YUV422 1-buffer 16bpp */ 1092 #define DCMIPP_PIXEL_PACKER_FORMAT_YUV422_2 (7U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< YUV422 2-buffer 16bpp */ 1093 #define DCMIPP_PIXEL_PACKER_FORMAT_YUV420_2 (8U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< YUV420 2-buffer 12bpp */ 1094 #define DCMIPP_PIXEL_PACKER_FORMAT_YUV420_3 (9U << DCMIPP_P1PPCR_FORMAT_Pos) /*!< YUV420 3-buffer 12bpp */ 1095 /** 1096 * @} 1097 */ 1098 1099 /** @defgroup DCMIPP_Statistics_Extraction_Mode DCMIPP Statistics extraction Mode 1100 * @{ 1101 */ 1102 #define DCMIPP_STAT_EXT_MODE_AVERAGE 0U /*!< Values of pixels are accumulated as-is */ 1103 #define DCMIPP_STAT_EXT_MODE_BINS (1U << DCMIPP_P1ST1CR_MODE_Pos) /*!< Values of pixels are used to see 1104 if the pixel fits one of the 12 bins.*/ 1105 /** 1106 * @} 1107 */ 1108 1109 /** @defgroup DCMIPP_Statistics_Extraction_Module_ID DCMIPP Statistics Extraction Module ID 1110 * @{ 1111 */ 1112 #define DCMIPP_STATEXT_MODULE1 1U /*!< Statistic Extraction Module 1 */ 1113 #define DCMIPP_STATEXT_MODULE2 2U /*!< Statistic Extraction Module 2 */ 1114 #define DCMIPP_STATEXT_MODULE3 3U /*!< Statistic Extraction Module 3 */ 1115 /** 1116 * @} 1117 */ 1118 1119 /** @defgroup DCMIPP_Statistics_Extraction_Source DCMIPP Statistics extraction Source 1120 * @{ 1121 */ 1122 #define DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_R 0U /*!< Statistics Extraction Source : Red 1123 is sampled before the black level calibration and exposure */ 1124 #define DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_G (1U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : Green 1125 is sampled before the black level calibration and exposure */ 1126 #define DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_B (2U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : Blue 1127 is sampled before the black level calibration and exposure */ 1128 #define DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_L (3U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : 1129 Luminance is sampled before the black level calibration and exposure */ 1130 #define DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_R (4U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : Red 1131 is sampled after the black level calibration and exposure */ 1132 #define DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_G (5U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : Green 1133 is sampled after the black level calibration and exposure */ 1134 #define DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_B (6U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : Blue 1135 is sampled after the black level calibration and exposure */ 1136 #define DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_L (7U << DCMIPP_P1ST1CR_SRC_Pos) /*!< Statistics Extraction Source : 1137 Luminance is sampled after the black level calibration and exposure */ 1138 /** 1139 * @} 1140 */ 1141 1142 /** @defgroup DCMIPP_Statistics_Extraction_Bins DCMIPP Statistics extraction Bins 1143 * @{ 1144 */ 1145 #define DCMIPP_STAT_EXT_BINS_MODE_LOWER_BINS 0U /*!< LowerBins: Accu0 (1, 2) 1146 is incremented of 256 if 1147 Component <4 (<8, <16) */ 1148 #define DCMIPP_STAT_EXT_BINS_MODE_LOWMID_BINS (1U << DCMIPP_P1ST1CR_BINS_Pos) /*!< LowMid Bins: Accu0 (1, 2) 1149 is incremented of 256 if 1150 Component <32 (<64, <128) */ 1151 #define DCMIPP_STAT_EXT_BINS_MODE_UPMID_BINS (2U << DCMIPP_P1ST1CR_BINS_Pos) /*!< UpMid Bins: Accu0 (1, 2) is 1152 incremented of 256 if 1153 Component >127 (>191, >224) */ 1154 #define DCMIPP_STAT_EXT_BINS_MODE_UP_BINS (3U << DCMIPP_P1ST1CR_BINS_Pos) /*!< UpBins: Accu0 (1, 2) is 1155 incremented of 256 if 1156 Component >239 (>247, >251) 1157 Condition: MODE = Average */ 1158 #define DCMIPP_STAT_EXT_AVER_MODE_ALL_PIXELS (0U << DCMIPP_P1ST1CR_BINS_Pos) /*!< All Pixels: Accu is incremented of 1159 Component, if 0 <= Component < 256 */ 1160 #define DCMIPP_STAT_EXT_AVER_MODE_NOEXT16 (1U << DCMIPP_P1ST1CR_BINS_Pos) /*!< NoExt16: Accu is incremented of 1161 Component, if 16 <= Component < 240 */ 1162 #define DCMIPP_STAT_EXT_AVER_MODE_NOEXT32 (2U << DCMIPP_P1ST1CR_BINS_Pos) /*!< NoExt32: Accu is incremented of 1163 Component, if 32 <= Component < 224 */ 1164 #define DCMIPP_STAT_EXT_AVER_MODE_NOEXT64 (3U << DCMIPP_P1ST1CR_BINS_Pos) /*!< NoExt64: Accu is incremented of 1165 Component, if 64 <= Component < 192 */ 1166 /** 1167 * @} 1168 */ 1169 1170 /** 1171 * @defgroup DCMIPP_RAWBayer2RGB_Strength DCMIPP RAWBayer2RGB Strength 1172 * @{ 1173 */ 1174 #define DCMIPP_RAWBAYER_ALGO_NONE 0U /*!< No edge detection, pure linear interpolation */ 1175 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_3 1U /*!< RawBayer relative algorithm strength 3 */ 1176 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_4 2U /*!< RawBayer relative algorithm strength 4 */ 1177 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_6 3U /*!< RawBayer relative algorithm strength 6 */ 1178 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_8 4U /*!< RawBayer relative algorithm strength 8 */ 1179 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_12 5U /*!< RawBayer relative algorithm strength 12 */ 1180 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_16 6U /*!< RawBayer relative algorithm strength 16 */ 1181 #define DCMIPP_RAWBAYER_ALGO_STRENGTH_24 7U /*!< RawBayer relative algorithm strength 24 */ 1182 1183 /** 1184 * @} 1185 */ 1186 1187 /** 1188 * @defgroup DCMIPP_RAWBayer2RGB_Type DCMIPP RAWBayer2RGB Type 1189 * @{ 1190 */ 1191 #define DCMIPP_RAWBAYER_RGGB 0U /*!<Raw Bayer Type RGGB */ 1192 #define DCMIPP_RAWBAYER_GRBG (1U << DCMIPP_P1DMCR_TYPE_Pos) /*!<Raw Bayer Type GRBG */ 1193 #define DCMIPP_RAWBAYER_GBRG (2U << DCMIPP_P1DMCR_TYPE_Pos) /*!<Raw Bayer Type GBRG */ 1194 #define DCMIPP_RAWBAYER_BGGR (3U << DCMIPP_P1DMCR_TYPE_Pos) /*!<Raw Bayer Type BGGR */ 1195 /** 1196 * @} 1197 */ 1198 1199 /** @defgroup DCMIPP_Bad_Pixel_Removal_Strength DCMIPP Bad Pixel Removal Strength 1200 * @{ 1201 */ 1202 #define DCMIPP_BAD_PXL_REM_SRENGTH_0 0U /*!< The filter is fairly tolerant: only a 1203 few pixels are declared bad, due to 1204 their high noise */ 1205 #define DCMIPP_BAD_PXL_REM_SRENGTH_1 1U /*!< Bad Pixel detection strength 1 */ 1206 #define DCMIPP_BAD_PXL_REM_SRENGTH_2 2U /*!< Bad Pixel detection strength 2 */ 1207 #define DCMIPP_BAD_PXL_REM_SRENGTH_3 3U /*!< Bad Pixel detection strength 3 */ 1208 #define DCMIPP_BAD_PXL_REM_SRENGTH_4 4U /*!< Bad Pixel detection strength 4 */ 1209 #define DCMIPP_BAD_PXL_REM_SRENGTH_5 5U /*!< Bad Pixel detection strength 5 */ 1210 #define DCMIPP_BAD_PXL_REM_SRENGTH_6 6U /*!< Bad Pixel detection strength 6 */ 1211 #define DCMIPP_BAD_PXL_REM_SRENGTH_7 7U /*!< Bad Pixel detection strength 7 */ 1212 /** 1213 * @} 1214 */ 1215 1216 /** @defgroup DCMIPP_Region_Of_Interest DCMIPP Region Of Interest 1217 * @{ 1218 */ 1219 #define DCMIPP_REGION_OF_INTEREST1 1U /*!< Region Of Interest 1 */ 1220 #define DCMIPP_REGION_OF_INTEREST2 2U /*!< Region Of Interest 2 */ 1221 #define DCMIPP_REGION_OF_INTEREST3 3U /*!< Region Of Interest 3 */ 1222 #define DCMIPP_REGION_OF_INTEREST4 4U /*!< Region Of Interest 4 */ 1223 #define DCMIPP_REGION_OF_INTEREST5 5U /*!< Region Of Interest 5 */ 1224 #define DCMIPP_REGION_OF_INTEREST6 6U /*!< Region Of Interest 6 */ 1225 #define DCMIPP_REGION_OF_INTEREST7 7U /*!< Region Of Interest 7 */ 1226 #define DCMIPP_REGION_OF_INTEREST8 8U /*!< Region Of Interest 8 */ 1227 /** 1228 * @} 1229 */ 1230 1231 /** @defgroup DCMIPP_Region_Of_Interest_Line_Width DCMIPP Region Of Interest Line Width 1232 * @{ 1233 */ 1234 #define DCMIPP_LINE_WIDTH_1PXL 0U /*!< Line width 1 pixel */ 1235 #define DCMIPP_LINE_WIDTH_2PXL 1U /*!< Line width 2 pixels */ 1236 #define DCMIPP_LINE_WIDTH_4PXL 2U /*!< Line width 4 pixels */ 1237 #define DCMIPP_LINE_WIDTH_8PXL 3U /*!< Line width 8 pixels */ 1238 /** 1239 * @} 1240 */ 1241 1242 /** @defgroup DCMIPP_Multiply DCMIPP Multiply 1243 * @{ 1244 */ 1245 #define DCMIPP_MULTIPY_BY_1 0U /*!< DCMIPP multiply R/G/B by 1 */ 1246 #define DCMIPP_MULTIPY_BY_2 1U /*!< DCMIPP multiply R/G/B by 2 */ 1247 #define DCMIPP_MULTIPY_BY_4 2U /*!< DCMIPP multiply R/G/B by 4 */ 1248 #define DCMIPP_MULTIPY_BY_8 3U /*!< DCMIPP multiply R/G/B by 8 */ 1249 /** 1250 * @} 1251 */ 1252 1253 /** @defgroup DCMIPP_Interrupt_Sources DCMIPP Interrupt sources 1254 * @{ 1255 */ 1256 #define DCMIPP_IT_AXI_TRANSFER_ERROR DCMIPP_CMIER_ATXERRIE /*!< IPPLUG AXI Transfer error interrupt */ 1257 #define DCMIPP_IT_PARALLEL_SYNC_ERROR DCMIPP_CMIER_PRERRIE /*!< Sync error interrupt on parallel interface */ 1258 #define DCMIPP_IT_PIPE0_FRAME DCMIPP_CMIER_P0FRAMEIE /*!< Frame capture interrupt complete for pipe0 */ 1259 #define DCMIPP_IT_PIPE0_VSYNC DCMIPP_CMIER_P0VSYNCIE /*!< Vertical sync interrupt for pipe0 */ 1260 #define DCMIPP_IT_PIPE0_LINE DCMIPP_CMIER_P0LINEIE /*!< Multiline interrupt for pipe0 */ 1261 #define DCMIPP_IT_PIPE0_LIMIT DCMIPP_CMIER_P0LIMITIE /*!< Limit interrupt for pipe0 */ 1262 #define DCMIPP_IT_PIPE0_OVR DCMIPP_CMIER_P0OVRIE /*!< Overrun interrupt for pipe0 */ 1263 #define DCMIPP_IT_PIPE1_LINE DCMIPP_CMIER_P1LINEIE /*!< Multiline capture interrupt for pipe1 */ 1264 #define DCMIPP_IT_PIPE1_FRAME DCMIPP_CMIER_P1FRAMEIE /*!< Frame capture interrupt complete for pipe1 */ 1265 #define DCMIPP_IT_PIPE1_VSYNC DCMIPP_CMIER_P1VSYNCIE /*!< Vertical sync interrupt for pipe1 */ 1266 #define DCMIPP_IT_PIPE1_OVR DCMIPP_CMIER_P1OVRIE /*!< Overrun interrupt for pipe1 */ 1267 #define DCMIPP_IT_PIPE2_LINE DCMIPP_CMIER_P2LINEIE /*!< Multiline capture interrupt for pipe2 */ 1268 #define DCMIPP_IT_PIPE2_FRAME DCMIPP_CMIER_P2FRAMEIE /*!< Frame capture interrupt complete for pipe2 */ 1269 #define DCMIPP_IT_PIPE2_VSYNC DCMIPP_CMIER_P2VSYNCIE /*!< Vertical synch interrupt for pipe2 */ 1270 #define DCMIPP_IT_PIPE2_OVR DCMIPP_CMIER_P2OVRIE /*!< Overrun interrupt for pipe2 */ 1271 /** 1272 * @} 1273 */ 1274 1275 /** @defgroup DCMIPP_Interrupt_Flags DCMIPP Interrupt Flags 1276 * @{ 1277 */ 1278 #define DCMIPP_FLAG_AXI_TRANSFER_ERROR DCMIPP_CMSR2_ATXERRF /*!< IPPLUG AXI Transfer error interrupt flag */ 1279 #define DCMIPP_FLAG_PARALLEL_SYNC_ERROR DCMIPP_CMSR2_PRERRF /*!< Synchronization error interrupt on parallel interface 1280 flag */ 1281 #define DCMIPP_FLAG_PIPE0_FRAME DCMIPP_CMSR2_P0FRAMEF /*!< Frame capture interrupt complete for pipe0 flag */ 1282 #define DCMIPP_FLAG_PIPE0_VSYNC DCMIPP_CMSR2_P0VSYNCF /*!< Vertical synch interrupt for pipe0 flag */ 1283 #define DCMIPP_FLAG_PIPE0_LINE DCMIPP_CMSR2_P0LINEF /*!< Multiline interrupt for pipe0 flag */ 1284 #define DCMIPP_FLAG_PIPE0_LIMIT DCMIPP_CMSR2_P0LIMITF /*!< Limit interrupt for pipe0 flag */ 1285 #define DCMIPP_FLAG_PIPE0_OVR DCMIPP_CMSR2_P0OVRF /*!< Overrun interrupt for pipe0 flag */ 1286 #define DCMIPP_FLAG_PIPE1_LINE DCMIPP_CMSR2_P1LINEF /*!< Multiline capture interrupt for pipe1 flag */ 1287 #define DCMIPP_FLAG_PIPE1_FRAME DCMIPP_CMSR2_P1FRAMEF /*!< Frame capture interrupt complete for pipe1 flag */ 1288 #define DCMIPP_FLAG_PIPE1_VSYNC DCMIPP_CMSR2_P1VSYNCF /*!< Vertical synch interrupt for pipe1 flag */ 1289 #define DCMIPP_FLAG_PIPE1_OVR DCMIPP_CMSR2_P1OVRF /*!< Overrun interrupt for pipe1 flag */ 1290 #define DCMIPP_FLAG_PIPE2_LINE DCMIPP_CMSR2_P2LINEF /*!< Multiline capture interrupt for pipe2 flag */ 1291 #define DCMIPP_FLAG_PIPE2_FRAME DCMIPP_CMSR2_P2FRAMEF /*!< Frame capture interrupt complete for pipe2 flag */ 1292 #define DCMIPP_FLAG_PIPE2_VSYNC DCMIPP_CMSR2_P2VSYNCF /*!< Vertical synch interrupt for pipe2 flag */ 1293 #define DCMIPP_FLAG_PIPE2_OVR DCMIPP_CMSR2_P2OVRF /*!< Overrun interrupt for pipe2 flag */ 1294 /** 1295 * @} 1296 */ 1297 /** @defgroup DCMIPP_CSI_Interrupt_Sources DCMIPP CSI Interrupt sources 1298 * @{ 1299 */ 1300 #define DCMIPP_CSI_IT_SYNCERR CSI_IER0_SYNCERRIE /*!< Synchronization error interrupt */ 1301 #define DCMIPP_CSI_IT_WDERR CSI_IER0_WDERRIE /*!< Watchdog error interrupt */ 1302 #define DCMIPP_CSI_IT_SPKTERR CSI_IER0_SPKTERRIE /*!< Shorter packet than expected error interrupt */ 1303 #define DCMIPP_CSI_IT_IDERR CSI_IER0_IDERRIE /*!< Data ID information error interrupt */ 1304 #define DCMIPP_CSI_IT_CECCERR CSI_IER0_CECCERRIE /*!< Corrected ECC error interrupt */ 1305 #define DCMIPP_CSI_IT_ECCERR CSI_IER0_ECCERRIE /*!< ECC Error interrupt */ 1306 #define DCMIPP_CSI_IT_CRCERR CSI_IER0_CRCERRIE /*!< CRC Error interrupt */ 1307 #define DCMIPP_CSI_IT_CCFIFO CSI_IER0_CCFIFOFIE /*!< Clock changer FIFO full event interrupt */ 1308 #define DCMIPP_CSI_IT_SPKT CSI_IER0_SPKTIE /*!< Short packet detection interrupt */ 1309 #define DCMIPP_CSI_IT_EOF3 CSI_IER0_EOF3IE /*!< EOF on virtual channel 3 interrupt */ 1310 #define DCMIPP_CSI_IT_EOF2 CSI_IER0_EOF2IE /*!< EOF on virtual channel 2 interrupt */ 1311 #define DCMIPP_CSI_IT_EOF1 CSI_IER0_EOF1IE /*!< EOF on virtual channel 1 interrupt */ 1312 #define DCMIPP_CSI_IT_EOF0 CSI_IER0_EOF0IE /*!< EOF on virtual channel 0 interrupt */ 1313 #define DCMIPP_CSI_IT_SOF3 CSI_IER0_SOF3IE /*!< SOF on virtual channel 3 interrupt */ 1314 #define DCMIPP_CSI_IT_SOF2 CSI_IER0_SOF2IE /*!< SOF on virtual channel 2 interrupt */ 1315 #define DCMIPP_CSI_IT_SOF1 CSI_IER0_SOF1IE /*!< SOF on virtual channel 1 interrupt */ 1316 #define DCMIPP_CSI_IT_SOF0 CSI_IER0_SOF0IE /*!< SOF on virtual channel 0 interrupt */ 1317 #define DCMIPP_CSI_IT_TIM3 CSI_IER0_TIM3IE /*!< Timer 3 counter value reached interrupt */ 1318 #define DCMIPP_CSI_IT_TIM2 CSI_IER0_TIM2IE /*!< Timer 2 counter value reached interrupt */ 1319 #define DCMIPP_CSI_IT_TIM1 CSI_IER0_TIM1IE /*!< Timer 1 counter value reached interrupt */ 1320 #define DCMIPP_CSI_IT_TIM0 CSI_IER0_TIM0IE /*!< Timer 0 counter value reached interrupt */ 1321 #define DCMIPP_CSI_IT_LB3 CSI_IER0_LB3IE /*!< Line/byte event 3 reached interrupt */ 1322 #define DCMIPP_CSI_IT_LB2 CSI_IER0_LB2IE /*!< Line/byte event 2 reached interrupt */ 1323 #define DCMIPP_CSI_IT_LB1 CSI_IER0_LB1IE /*!< Line/byte event 1 reached interrupt */ 1324 #define DCMIPP_CSI_IT_LB0 CSI_IER0_LB0IE /*!< Line/byte event 0 reached interrupt */ 1325 #define DCMIPP_CSI_IT_ECTRLDL1 CSI_IER1_ECTRLDL1IE /*!< Error control on data line 1 interrupt */ 1326 #define DCMIPP_CSI_IT_ESYNCESCDL1 CSI_IER1_ESYNCESCDL1IE /*!< Low-power data transmission synchronization error on 1327 data line 1 interrupt */ 1328 #define DCMIPP_CSI_IT_EESCDL1 CSI_IER1_EESCDL1IE /*!< Escape entry error on data line 1 interrupt */ 1329 #define DCMIPP_CSI_IT_ESOTSYNCDL1 CSI_IER1_ESOTSYNCDL1IE /*!< SOT synchronization error on data line 1 interrupt */ 1330 #define DCMIPP_CSI_IT_ESOTDL1 CSI_IER1_ESOTDL1IE /*!< SOT error on data line 1 interrupt */ 1331 #define DCMIPP_CSI_IT_ECTRLDL0 CSI_IER1_ECTRLDL0IE /*!< Error control on data line 0 interrupt */ 1332 #define DCMIPP_CSI_IT_ESYNCESCDL0 CSI_IER1_ESYNCESCDL0IE /*!< Low-power data transmission synchronization error on 1333 data line 0 interrupt */ 1334 #define DCMIPP_CSI_IT_EESCDL0 CSI_IER1_EESCDL0IE /*!< Escape entry error on data line 0 interrupt */ 1335 #define DCMIPP_CSI_IT_ESOTSYNCDL0 CSI_IER1_ESOTSYNCDL0IE /*!< SOT synchronization error on data line 0 interrupt */ 1336 #define DCMIPP_CSI_IT_ESOTDL0 CSI_IER1_ESOTDL0IE /*!< SOT error on data line 0 interrupt */ 1337 /** 1338 * @} 1339 */ 1340 /** @defgroup DCMIPP_CSI_Interrupt_Flags DCMIPP CSI Interrupt Flags 1341 * @{ 1342 */ 1343 #define DCMIPP_CSI_FLAG_SYNCERR CSI_SR0_SYNCERRF /*!< Synchronization error flag */ 1344 #define DCMIPP_CSI_FLAG_WDERR CSI_SR0_WDERRF /*!< Watchdog error flag */ 1345 #define DCMIPP_CSI_FLAG_SPKTERR CSI_SR0_SPKTERRF /*!< Shorter packet than expected error flag */ 1346 #define DCMIPP_CSI_FLAG_IDERR CSI_SR0_IDERRF /*!< Data ID information error flag */ 1347 #define DCMIPP_CSI_FLAG_CECCERR CSI_SR0_CECCERRF /*!< Corrected ECC error flag */ 1348 #define DCMIPP_CSI_FLAG_ECCERR CSI_SR0_ECCERRF /*!< ECC Error flag */ 1349 #define DCMIPP_CSI_FLAG_CRCERR CSI_SR0_CRCERRF /*!< CRC Error flag */ 1350 #define DCMIPP_CSI_FLAG_CCFIFO CSI_SR0_CCFIFOFF /*!< Clock changer FIFO full event flag */ 1351 #define DCMIPP_CSI_FLAG_SPKT CSI_SR0_SPKTF /*!< Short packet detection flag */ 1352 #define DCMIPP_CSI_FLAG_EOF3 CSI_SR0_EOF3F /*!< EOF on virtual channel 3 flag */ 1353 #define DCMIPP_CSI_FLAG_EOF2 CSI_SR0_EOF2F /*!< EOF on virtual channel 2 flag */ 1354 #define DCMIPP_CSI_FLAG_EOF1 CSI_SR0_EOF1F /*!< EOF on virtual channel 1 flag */ 1355 #define DCMIPP_CSI_FLAG_EOF0 CSI_SR0_EOF0F /*!< EOF on virtual channel 0 flag */ 1356 #define DCMIPP_CSI_FLAG_SOF3 CSI_SR0_SOF3F /*!< SOF on virtual channel 3 flag */ 1357 #define DCMIPP_CSI_FLAG_SOF2 CSI_SR0_SOF2F /*!< SOF on virtual channel 2 flag */ 1358 #define DCMIPP_CSI_FLAG_SOF1 CSI_SR0_SOF1F /*!< SOF on virtual channel 1 flag */ 1359 #define DCMIPP_CSI_FLAG_SOF0 CSI_SR0_SOF0F /*!< SOF on virtual channel 0 flag */ 1360 #define DCMIPP_CSI_FLAG_TIM3 CSI_SR0_TIM3F /*!< Timer 3 counter value reached flag */ 1361 #define DCMIPP_CSI_FLAG_TIM2 CSI_SR0_TIM2F /*!< Timer 2 counter value reached flag */ 1362 #define DCMIPP_CSI_FLAG_TIM1 CSI_SR0_TIM1F /*!< Timer 1 counter value reached flag */ 1363 #define DCMIPP_CSI_FLAG_TIM0 CSI_SR0_TIM0F /*!< Timer 0 counter value reached flag */ 1364 #define DCMIPP_CSI_FLAG_LB3 CSI_SR0_LB3F /*!< Line/byte event 3 reached flag */ 1365 #define DCMIPP_CSI_FLAG_LB2 CSI_SR0_LB2F /*!< Line/byte event 2 reached flag */ 1366 #define DCMIPP_CSI_FLAG_LB1 CSI_SR0_LB1F /*!< Line/byte event 1 reached flag */ 1367 #define DCMIPP_CSI_FLAG_LB0 CSI_SR0_LB0F /*!< Line/byte event 0 reached flag */ 1368 #define DCMIPP_CSI_FLAG_ECTRLDL1 CSI_SR1_ECTRLDL1F /*!< Error control on data line 1 flag */ 1369 #define DCMIPP_CSI_FLAG_ESYNCESCDL1 CSI_SR1_ESYNCESCDL1F /*!< Low-power data transmission synchronization 1370 error on data line 1 flag */ 1371 #define DCMIPP_CSI_FLAG_EESCDL1 CSI_SR1_EESCDL1F /*!< Escape entry error on data line 1 flag */ 1372 #define DCMIPP_CSI_FLAG_ESOTSYNCDL1 CSI_SR1_ESOTSYNCDL1F /*!< SOT synchronization error on data line 1 flag */ 1373 #define DCMIPP_CSI_FLAG_ESOTDL1 CSI_SR1_ESOTDL1F /*!< SOT error on data line 1 flag */ 1374 #define DCMIPP_CSI_FLAG_ECTRLDL0 CSI_SR1_ECTRLDL0F /*!< Error control on data line 0 flag */ 1375 #define DCMIPP_CSI_FLAG_ESYNCESCDL0 CSI_SR1_ESYNCESCDL0F /*!< Low-power data transmission synchronization 1376 error on data line 0 flag */ 1377 #define DCMIPP_CSI_FLAG_EESCDL0 CSI_SR1_EESCDL0F /*!< Escape entry error on data line 0 flag */ 1378 #define DCMIPP_CSI_FLAG_ESOTSYNCDL0 CSI_SR1_ESOTSYNCDL0F /*!< SOT synchronization error on data line 0 flag */ 1379 #define DCMIPP_CSI_FLAG_ESOTDL0 CSI_SR1_ESOTDL0F /*!< SOT error on data line 0 flag */ 1380 /** 1381 * @} 1382 */ 1383 1384 /** 1385 * @} 1386 */ 1387 1388 /* Exported macro ------------------------------------------------------------*/ 1389 /** @defgroup DCMIPP_Exported_Macros DCMIPP Exported Macros 1390 * @brief DCMIPP Exported Macros 1391 * @{ 1392 */ 1393 /** 1394 * @brief Enable the specified DCMIPP interrupts. 1395 * @param __HANDLE__ DCMIPP handle 1396 * @param __INTERRUPT__ specifies the DCMIPP interrupt sources to be enabled. 1397 * This parameter can be any combination of the following values: 1398 * @arg DCMIPP_IT_AXI_TRANSFER_ERR IPPLUG AXI Transfer error interrupt 1399 * @arg DCMIPP_IT_PARALLEL_SYNC_ERR Synchronization error interrupt on parallel interface 1400 * @arg DCMIPP_IT_PIPE0_FRAME Frame capture complete interrupt for the pipe0 1401 * @arg DCMIPP_IT_PIPE0_VSYNC Vertical sync interrupt for the pipe0 1402 * @arg DCMIPP_IT_PIPE0_LINE Multi-line capture complete interrupt for the pipe0 1403 * @arg DCMIPP_IT_PIPE0_LIMIT Limit interrupt for the pipe0 1404 * @arg DCMIPP_IT_PIPE0_OVR Overrun interrupt for the pipe0 1405 * @arg DCMIPP_IT_PIPE1_LINE Multi-line capture complete interrupt for the pipe1 1406 * @arg DCMIPP_IT_PIPE1_FRAME Frame capture complete interrupt for the pipe1 1407 * @arg DCMIPP_IT_PIPE1_VSYNC Vertical sync interrupt for the pipe1 1408 * @arg DCMIPP_IT_PIPE1_OVR Overrun interrupt for the pipe1 1409 * @arg DCMIPP_IT_PIPE2_LINE Multi-line capture complete interrupt for the pipe2 1410 * @arg DCMIPP_IT_PIPE2_FRAME Frame capture complete interrupt for the pipe2 1411 * @arg DCMIPP_IT_PIPE2_VSYNC Vertical sync interrupt for the pipe2 1412 * @arg DCMIPP_IT_PIPE2_OVR Overrun interrupt for the pipe2 1413 * @retval None 1414 */ 1415 #define __HAL_DCMIPP_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CMIER |= (__INTERRUPT__)) 1416 1417 /** 1418 * @brief Disable the specified DCMIPP interrupts. 1419 * @param __HANDLE__ DCMIPP handle 1420 * @param __INTERRUPT__ specifies the DCMIPP interrupt sources to be disabled. 1421 * This parameter can be any combination of the following values: 1422 * @arg DCMIPP_IT_AXI_TRANSFER_ERR IPPLUG AXI Transfer error interrupt 1423 * @arg DCMIPP_IT_PARALLEL_SYNC_ERR Synchronization error interrupt on parallel interface 1424 * @arg DCMIPP_IT_PIPE0_FRAME Frame capture complete interrupt for the pipe0 1425 * @arg DCMIPP_IT_PIPE0_VSYNC Vertical sync interrupt for the pipe0 1426 * @arg DCMIPP_IT_PIPE0_LINE Multi-line capture complete interrupt for the pipe0 1427 * @arg DCMIPP_IT_PIPE0_LIMIT Limit interrupt for the pipe0 1428 * @arg DCMIPP_IT_PIPE0_OVR Overrun interrupt for the pipe0 1429 * @arg DCMIPP_IT_PIPE1_LINE Multi-line capture complete interrupt for the pipe1 1430 * @arg DCMIPP_IT_PIPE1_FRAME Frame capture complete interrupt for the pipe1 1431 * @arg DCMIPP_IT_PIPE1_VSYNC Vertical sync interrupt for the pipe1 1432 * @arg DCMIPP_IT_PIPE1_OVR Overrun interrupt for the pipe1 1433 * @arg DCMIPP_IT_PIPE2_LINE Multi-line capture complete interrupt for the pipe2 1434 * @arg DCMIPP_IT_PIPE2_FRAME Frame capture complete interrupt for the pipe2 1435 * @arg DCMIPP_IT_PIPE2_VSYNC Vertical sync interrupt for the pipe2 1436 * @arg DCMIPP_IT_PIPE2_OVR Overrun interrupt for the pipe2 1437 * @retval None 1438 */ 1439 #define __HAL_DCMIPP_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CMIER &= ~(__INTERRUPT__)) 1440 1441 /** 1442 * @brief Get the DCMIPP pending interrupt flags. 1443 * @param __HANDLE__ DCMIPP handle 1444 * @param __FLAG__ Get the specified flag. 1445 * This parameter can be any combination of the following values: 1446 * @arg DCMIPP_FLAG_AXI_TRANSFER_ERR IPPLUG AXI Transfer error interrupt flag 1447 * @arg DCMIPP_FLAG_PARALLEL_SYNC_ERR Synchronization error interrupt flag on parallel interface 1448 * @arg DCMIPP_FLAG_PIPE0_FRAME Frame capture complete interrupt flag for the pipe0 1449 * @arg DCMIPP_FLAG_PIPE0_VSYNC Vertical sync interrupt flag for the pipe0 1450 * @arg DCMIPP_FLAG_PIPE0_LINE Multi-line capture complete interrupt flag for the pipe0 1451 * @arg DCMIPP_FLAG_PIPE0_LIMIT Limit interrupt flag for the pipe0 1452 * @arg DCMIPP_FLAG_PIPE0_OVR Overrun interrupt flag for the pipe0 1453 * @arg DCMIPP_FLAG_PIPE1_LINE Multi-line capture complete interrupt flag for the pipe1 1454 * @arg DCMIPP_FLAG_PIPE1_FRAME Frame capture complete interrupt flag for the pipe1 1455 * @arg DCMIPP_FLAG_PIPE1_VSYNC Vertical sync interrupt flag for the pipe1 1456 * @arg DCMIPP_FLAG_PIPE1_OVR Overrun interrupt flag for the pipe1 1457 * @arg DCMIPP_FLAG_PIPE2_LINE Multi-line capture complete interrupt flag for the pipe2 1458 * @arg DCMIPP_FLAG_PIPE2_FRAME Frame capture complete interrupt flag for the pipe2 1459 * @arg DCMIPP_FLAG_PIPE2_VSYNC Vertical sync interrupt flag for the pipe2 1460 * @arg DCMIPP_FLAG_PIPE2_OVR Overrun interrupt flag for the pipe2 1461 * @retval The state of FLAG (SET or RESET). 1462 */ 1463 #define __HAL_DCMIPP_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CMSR2 & (__FLAG__)) 1464 1465 /** 1466 * @brief Clear the DCMIPP pending interrupt flags. 1467 * @param __HANDLE__ DCMIPP handle 1468 * @param __FLAG__ specifies the flag to clear. 1469 * This parameter can be any combination of the following values: 1470 * @arg DCMIPP_FLAG_AXI_TRANSFER_ERR IPPLUG AXI Transfer error interrupt 1471 * @arg DCMIPP_FLAG_PARALLEL_SYNC_ERR Synchronization error interrupt on parallel interface 1472 * @arg DCMIPP_FLAG_PIPE0_FRAME Frame capture complete interrupt for the pipe0 1473 * @arg DCMIPP_FLAG_PIPE0_VSYNC Vertical sync interrupt for the pipe0 1474 * @arg DCMIPP_FLAG_PIPE0_LINE Multi-line capture complete interrupt for the pipe0 1475 * @arg DCMIPP_FLAG_PIPE0_LIMIT Limit interrupt for the pipe0 1476 * @arg DCMIPP_FLAG_PIPE0_OVR Overrun interrupt for the pipe0 1477 * @arg DCMIPP_FLAG_PIPE1_LINE Multi-line capture complete interrupt for the pipe1 1478 * @arg DCMIPP_FLAG_PIPE1_FRAME Frame capture complete interrupt for the pipe1 1479 * @arg DCMIPP_FLAG_PIPE1_VSYNC Vertical sync interrupt for the pipe1 1480 * @arg DCMIPP_FLAG_PIPE1_OVR Overrun interrupt for the pipe1 1481 * @arg DCMIPP_FLAG_PIPE2_LINE Multi-line capture complete interrupt for the pipe2 1482 * @arg DCMIPP_FLAG_PIPE2_FRAME Frame capture complete interrupt for the pipe2 1483 * @arg DCMIPP_FLAG_PIPE2_VSYNC Vertical sync interrupt for the pipe2 1484 * @arg DCMIPP_FLAG_PIPE2_OVR Overrun interrupt for the pipe2 1485 * @retval None 1486 */ 1487 #define __HAL_DCMIPP_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->CMFCR = (__FLAG__)) 1488 1489 /** 1490 * @brief Checks whether the specified DCMIPP interrupt is enabled or not. 1491 * @param __HANDLE__ DCMIPP handle 1492 * @param __INTERRUPT__ specifies the DCMIPP interrupt sources to be checked. 1493 * This parameter can be any combination of the following values: 1494 * @arg DCMIPP_IT_AXI_TRANSFER_ERR IPPLUG AXI Transfer error interrupt 1495 * @arg DCMIPP_IT_PARALLEL_SYNC_ERR Synchronization error interrupt on parallel interface 1496 * @arg DCMIPP_IT_PIPE0_FRAME Frame capture complete interrupt for the pipe0 1497 * @arg DCMIPP_IT_PIPE0_VSYNC Vertical sync interrupt for the pipe0 1498 * @arg DCMIPP_IT_PIPE0_LINE Multi-line capture complete interrupt for the pipe0 1499 * @arg DCMIPP_IT_PIPE0_LIMIT Limit interrupt for the pipe0 1500 * @arg DCMIPP_IT_PIPE0_OVR Overrun interrupt for the pipe0 1501 * @arg DCMIPP_IT_PIPE1_LINE Multi-line capture complete interrupt for the pipe1 1502 * @arg DCMIPP_IT_PIPE1_FRAME Frame capture complete interrupt for the pipe1 1503 * @arg DCMIPP_IT_PIPE1_VSYNC Vertical sync interrupt for the pipe1 1504 * @arg DCMIPP_IT_PIPE1_OVR Overrun interrupt for the pipe1 1505 * @arg DCMIPP_IT_PIPE2_LINE Multi-line capture complete interrupt for the pipe2 1506 * @arg DCMIPP_IT_PIPE2_FRAME Frame capture complete interrupt for the pipe2 1507 * @arg DCMIPP_IT_PIPE2_VSYNC Vertical sync interrupt for the pipe2 1508 * @arg DCMIPP_IT_PIPE2_OVR Overrun interrupt for the pipe2 1509 * @retval The state of DCMIPP interrupt (SET or RESET). 1510 */ 1511 #define __HAL_DCMIPP_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CMIER & \ 1512 (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) 1513 1514 /** 1515 * @brief Enable the specified DCMIPP CSI interrupts. 1516 * @param __HANDLE__ CSI handle 1517 * @param __INTERRUPT__ specifies the DCMIPP CSI interrupt sources to be enabled. 1518 * This parameter can be any combination of the following values: 1519 * @arg DCMIPP_CSI_IT_SYNCERR Synchronization error interrupt 1520 * @arg DCMIPP_CSI_IT_WDERR Watchdog error interrupt 1521 * @arg DCMIPP_CSI_IT_SPKTERR Shorter packet than expected error interrupt 1522 * @arg DCMIPP_CSI_IT_IDERR Data ID information error interrupt 1523 * @arg DCMIPP_CSI_IT_CECCERR Corrected ECC error interrupt 1524 * @arg DCMIPP_CSI_IT_ECCERR ECC Error interrupt 1525 * @arg DCMIPP_CSI_IT_CRCERR CRC Error interrupt 1526 * @arg DCMIPP_CSI_IT_CCFIFO Clock changer FIFO full event interrupt 1527 * @arg DCMIPP_CSI_IT_SPKT Short packet detection interrupt 1528 * @arg DCMIPP_CSI_IT_EOF3 EOF on virtual channel 3 interrupt 1529 * @arg DCMIPP_CSI_IT_EOF2 EOF on virtual channel 2 interrupt 1530 * @arg DCMIPP_CSI_IT_EOF1 EOF on virtual channel 1 interrupt 1531 * @arg DCMIPP_CSI_IT_EOF0 EOF on virtual channel 0 interrupt 1532 * @arg DCMIPP_CSI_IT_SOF3 SOF on virtual channel 3 interrupt 1533 * @arg DCMIPP_CSI_IT_SOF2 SOF on virtual channel 2 interrupt 1534 * @arg DCMIPP_CSI_IT_SOF1 SOF on virtual channel 1 interrupt 1535 * @arg DCMIPP_CSI_IT_SOF0 SOF on virtual channel 0 interrupt 1536 * @arg DCMIPP_CSI_IT_TIM3 Timer 3 counter value reached interrupt 1537 * @arg DCMIPP_CSI_IT_TIM2 Timer 2 counter value reached interrupt 1538 * @arg DCMIPP_CSI_IT_TIM1 Timer 1 counter value reached interrupt 1539 * @arg DCMIPP_CSI_IT_TIM0 Timer 0 counter value reached interrupt 1540 * @arg DCMIPP_CSI_IT_LB3 Line/byte event 3 reached interrupt 1541 * @arg DCMIPP_CSI_IT_LB2 Line/byte event 2 reached interrupt 1542 * @arg DCMIPP_CSI_IT_LB1 Line/byte event 1 reached interrupt 1543 * @arg DCMIPP_CSI_IT_LB0 Line/byte event 0 reached interrupt 1544 * @retval None 1545 */ 1546 #define __HAL_DCMIPP_CSI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->IER0 |= (__INTERRUPT__)) 1547 /** 1548 * @brief Disable the specified DCMIPP CSI interrupts. 1549 * @param __HANDLE__ CSI handle 1550 * @param __INTERRUPT__ specifies the DCMIPP CSI interrupt sources to be enabled. 1551 * This parameter can be any combination of the following values: 1552 * @arg DCMIPP_CSI_IT_SYNCERR Synchronization error interrupt 1553 * @arg DCMIPP_CSI_IT_WDERR Watchdog error interrupt 1554 * @arg DCMIPP_CSI_IT_SPKTERR Shorter packet than expected error interrupt 1555 * @arg DCMIPP_CSI_IT_IDERR Data ID information error interrupt 1556 * @arg DCMIPP_CSI_IT_CECCERR Corrected ECC error interrupt 1557 * @arg DCMIPP_CSI_IT_ECCERR ECC Error interrupt 1558 * @arg DCMIPP_CSI_IT_CRCERR CRC Error interrupt 1559 * @arg DCMIPP_CSI_IT_CCFIFO Clock changer FIFO full event interrupt 1560 * @arg DCMIPP_CSI_IT_SPKT Short packet detection interrupt 1561 * @arg DCMIPP_CSI_IT_EOF3 EOF on virtual channel 3 interrupt 1562 * @arg DCMIPP_CSI_IT_EOF2 EOF on virtual channel 2 interrupt 1563 * @arg DCMIPP_CSI_IT_EOF1 EOF on virtual channel 1 interrupt 1564 * @arg DCMIPP_CSI_IT_EOF0 EOF on virtual channel 0 interrupt 1565 * @arg DCMIPP_CSI_IT_SOF3 SOF on virtual channel 3 interrupt 1566 * @arg DCMIPP_CSI_IT_SOF2 SOF on virtual channel 2 interrupt 1567 * @arg DCMIPP_CSI_IT_SOF1 SOF on virtual channel 1 interrupt 1568 * @arg DCMIPP_CSI_IT_SOF0 SOF on virtual channel 0 interrupt 1569 * @arg DCMIPP_CSI_IT_TIM3 Timer 3 counter value reached interrupt 1570 * @arg DCMIPP_CSI_IT_TIM2 Timer 2 counter value reached interrupt 1571 * @arg DCMIPP_CSI_IT_TIM1 Timer 1 counter value reached interrupt 1572 * @arg DCMIPP_CSI_IT_TIM0 Timer 0 counter value reached interrupt 1573 * @arg DCMIPP_CSI_IT_LB3 Line/byte event 3 reached interrupt 1574 * @arg DCMIPP_CSI_IT_LB2 Line/byte event 2 reached interrupt 1575 * @arg DCMIPP_CSI_IT_LB1 Line/byte event 1 reached interrupt 1576 * @arg DCMIPP_CSI_IT_LB0 Line/byte event 0 reached interrupt 1577 * @retval None 1578 */ 1579 #define __HAL_DCMIPP_CSI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->IER0 &= ~(__INTERRUPT__)) 1580 /** 1581 * @brief Get the DCMIPP CSI pending interrupt flags. 1582 * @param __HANDLE__ CSI handle 1583 * @param __FLAG__ Get the specified flag. 1584 * This parameter can be any combination of the following values: 1585 * @arg DCMIPP_CSI_FLAG_SYNCERR Synchronization error flag 1586 * @arg DCMIPP_CSI_FLAG_WDERR Watchdog error flag 1587 * @arg DCMIPP_CSI_FLAG_SPKTERR Shorter packet than expected error flag 1588 * @arg DCMIPP_CSI_FLAG_IDERR Data ID information error flag 1589 * @arg DCMIPP_CSI_FLAG_CECCERR Corrected ECC error flag 1590 * @arg DCMIPP_CSI_FLAG_ECCERR ECC Error flag 1591 * @arg DCMIPP_CSI_FLAG_CRCERR CRC Error flag 1592 * @arg DCMIPP_CSI_FLAG_CCFIFO Clock changer FIFO full event flag 1593 * @arg DCMIPP_CSI_FLAG_SPKT Short packet detection flag 1594 * @arg DCMIPP_CSI_FLAG_EOF3 EOF on virtual channel 3 flag 1595 * @arg DCMIPP_CSI_FLAG_EOF2 EOF on virtual channel 2 flag 1596 * @arg DCMIPP_CSI_FLAG_EOF1 EOF on virtual channel 1 flag 1597 * @arg DCMIPP_CSI_FLAG_EOF0 EOF on virtual channel 0 flag 1598 * @arg DCMIPP_CSI_FLAG_SOF3 SOF on virtual channel 3 flag 1599 * @arg DCMIPP_CSI_FLAG_SOF2 SOF on virtual channel 2 flag 1600 * @arg DCMIPP_CSI_FLAG_SOF1 SOF on virtual channel 1 flag 1601 * @arg DCMIPP_CSI_FLAG_SOF0 SOF on virtual channel 0 flag 1602 * @arg DCMIPP_CSI_FLAG_TIM3 Timer 3 counter value reached flag 1603 * @arg DCMIPP_CSI_FLAG_TIM2 Timer 2 counter value reached flag 1604 * @arg DCMIPP_CSI_FLAG_TIM1 Timer 1 counter value reached flag 1605 * @arg DCMIPP_CSI_FLAG_TIM0 Timer 0 counter value reached flag 1606 * @arg DCMIPP_CSI_FLAG_LB3 Line/byte event 3 reached flag 1607 * @arg DCMIPP_CSI_FLAG_LB2 Line/byte event 2 reached flag 1608 * @arg DCMIPP_CSI_FLAG_LB1 Line/byte event 1 reached flag 1609 * @arg DCMIPP_CSI_FLAG_LB0 Line/byte event 0 reached flag 1610 * @retval None 1611 */ 1612 #define __HAL_DCMIPP_CSI_GET_FLAG(__HANDLE__, __FLAG__)((__HANDLE__)->IER0 & (__FLAG__)) 1613 /** 1614 * @brief Clear the DCMIPP CSI pending interrupt flags. 1615 * @param __HANDLE__ CSI handle 1616 * @param __FLAG__ specifies the flag to clear. 1617 * This parameter can be any combination of the following values: 1618 * @arg DCMIPP_CSI_FLAG_SYNCERR Synchronization error flag 1619 * @arg DCMIPP_CSI_FLAG_WDERR Watchdog error flag 1620 * @arg DCMIPP_CSI_FLAG_SPKTERR Shorter packet than expected error flag 1621 * @arg DCMIPP_CSI_FLAG_IDERR Data ID information error flag 1622 * @arg DCMIPP_CSI_FLAG_CECCERR Corrected ECC error flag 1623 * @arg DCMIPP_CSI_FLAG_ECCERR ECC Error flag 1624 * @arg DCMIPP_CSI_FLAG_CRCERR CRC Error flag 1625 * @arg DCMIPP_CSI_FLAG_CCFIFO Clock changer FIFO full event flag 1626 * @arg DCMIPP_CSI_FLAG_SPKT Short packet detection flag 1627 * @arg DCMIPP_CSI_FLAG_EOF3 EOF on virtual channel 3 flag 1628 * @arg DCMIPP_CSI_FLAG_EOF2 EOF on virtual channel 2 flag 1629 * @arg DCMIPP_CSI_FLAG_EOF1 EOF on virtual channel 1 flag 1630 * @arg DCMIPP_CSI_FLAG_EOF0 EOF on virtual channel 0 flag 1631 * @arg DCMIPP_CSI_FLAG_SOF3 SOF on virtual channel 3 flag 1632 * @arg DCMIPP_CSI_FLAG_SOF2 SOF on virtual channel 2 flag 1633 * @arg DCMIPP_CSI_FLAG_SOF1 SOF on virtual channel 1 flag 1634 * @arg DCMIPP_CSI_FLAG_SOF0 SOF on virtual channel 0 flag 1635 * @arg DCMIPP_CSI_FLAG_TIM3 Timer 3 counter value reached flag 1636 * @arg DCMIPP_CSI_FLAG_TIM2 Timer 2 counter value reached flag 1637 * @arg DCMIPP_CSI_FLAG_TIM1 Timer 1 counter value reached flag 1638 * @arg DCMIPP_CSI_FLAG_TIM0 Timer 0 counter value reached flag 1639 * @arg DCMIPP_CSI_FLAG_LB3 Line/byte event 3 reached flag 1640 * @arg DCMIPP_CSI_FLAG_LB2 Line/byte event 2 reached flag 1641 * @arg DCMIPP_CSI_FLAG_LB1 Line/byte event 1 reached flag 1642 * @arg DCMIPP_CSI_FLAG_LB0 Line/byte event 0 reached flag 1643 * @retval None 1644 */ 1645 #define __HAL_DCMIPP_CSI_CLEAR_FLAG(__HANDLE__, __FLAG__)((__HANDLE__)->FCR0 = (__FLAG__)) 1646 /** 1647 * @brief Checks whether the specified DCMIPP interrupt is enabled or not. 1648 * @param __HANDLE__ DCMIPP handle 1649 * @param __INTERRUPT__ specifies the DCMIPP interrupt sources to be checked. 1650 * This parameter can be any combination of the following values: 1651 * @arg DCMIPP_CSI_IT_SYNCERR Synchronization error interrupt 1652 * @arg DCMIPP_CSI_IT_WDERR Watchdog error interrupt 1653 * @arg DCMIPP_CSI_IT_SPKTERR Shorter packet than expected error interrupt 1654 * @arg DCMIPP_CSI_IT_IDERR Data ID information error interrupt 1655 * @arg DCMIPP_CSI_IT_CECCERR Corrected ECC error interrupt 1656 * @arg DCMIPP_CSI_IT_ECCERR ECC Error interrupt 1657 * @arg DCMIPP_CSI_IT_CRCERR CRC Error interrupt 1658 * @arg DCMIPP_CSI_IT_CCFIFO Clock changer FIFO full event interrupt 1659 * @arg DCMIPP_CSI_IT_SPKT Short packet detection interrupt 1660 * @arg DCMIPP_CSI_IT_EOF3 EOF on virtual channel 3 interrupt 1661 * @arg DCMIPP_CSI_IT_EOF2 EOF on virtual channel 2 interrupt 1662 * @arg DCMIPP_CSI_IT_EOF1 EOF on virtual channel 1 interrupt 1663 * @arg DCMIPP_CSI_IT_EOF0 EOF on virtual channel 0 interrupt 1664 * @arg DCMIPP_CSI_IT_SOF3 SOF on virtual channel 3 interrupt 1665 * @arg DCMIPP_CSI_IT_SOF2 SOF on virtual channel 2 interrupt 1666 * @arg DCMIPP_CSI_IT_SOF1 SOF on virtual channel 1 interrupt 1667 * @arg DCMIPP_CSI_IT_SOF0 SOF on virtual channel 0 interrupt 1668 * @arg DCMIPP_CSI_IT_TIM3 Timer 3 counter value reached interrupt 1669 * @arg DCMIPP_CSI_IT_TIM2 Timer 2 counter value reached interrupt 1670 * @arg DCMIPP_CSI_IT_TIM1 Timer 1 counter value reached interrupt 1671 * @arg DCMIPP_CSI_IT_TIM0 Timer 0 counter value reached interrupt 1672 * @arg DCMIPP_CSI_IT_LB3 Line/byte event 3 reached interrupt 1673 * @arg DCMIPP_CSI_IT_LB2 Line/byte event 2 reached interrupt 1674 * @arg DCMIPP_CSI_IT_LB1 Line/byte event 1 reached interrupt 1675 * @arg DCMIPP_CSI_IT_LB0 Line/byte event 0 reached interrupt 1676 * @retval The state of DCMIPP interrupt (SET or RESET). 1677 */ 1678 #define __HAL_DCMIPP_CSI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->IER0 & (__INTERRUPT__)) == \ 1679 (__INTERRUPT__)) ? SET : RESET) 1680 /** 1681 * @brief Enable the specified DCMIPP CSI DPHY interrupts. 1682 * @param __HANDLE__ CSI handle 1683 * @param __INTERRUPT__ specifies the DCMIPP CSI interrupt sources to be enabled. 1684 * This parameter can be any combination of the following values: 1685 * @arg DCMIPP_CSI_IT_ECTRLDL1 Error control on data line 1 interrupt 1686 * @arg DCMIPP_CSI_IT_ESYNCESCDL1 Low-power data transmission synchronization error on data line 1 interrupt 1687 * @arg DCMIPP_CSI_IT_EESCDL1 Escape entry error on data line 1 interrupt 1688 * @arg DCMIPP_CSI_IT_ESOTSYNCDL1 SOT synchronization error on data line 1 interrupt 1689 * @arg DCMIPP_CSI_IT_ESOTDL1 SOT error on data line 1 interrupt 1690 * @arg DCMIPP_CSI_IT_ECTRLDL0 Error control on data line 0 interrupt 1691 * @arg DCMIPP_CSI_IT_ESYNCESCDL0 Low-power data transmission synchronization error on data line 0 interrupt 1692 * @arg DCMIPP_CSI_IT_EESCDL0 Escape entry error on data line 0 interrupt 1693 * @arg DCMIPP_CSI_IT_ESOTSYNCDL0 SOT synchronization error on data line 0 interrupt 1694 * @arg DCMIPP_CSI_IT_ESOTDL0 SOT error on data line 0 interrupt 1695 * @retval None 1696 */ 1697 #define __HAL_DCMIPP_CSI_DPHY_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->IER1 |= (__INTERRUPT__)) 1698 /** 1699 * @brief Disable the specified DCMIPP CSI DPHY interrupts. 1700 * @param __HANDLE__ CSI handle 1701 * @param __INTERRUPT__ specifies the DCMIPP CSI interrupt sources to be enabled. 1702 * This parameter can be any combination of the following values: 1703 * @arg DCMIPP_CSI_IT_ECTRLDL1 Error control on data line 1 interrupt 1704 * @arg DCMIPP_CSI_IT_ESYNCESCDL1 Low-power data transmission synchronization error on data line 1 interrupt 1705 * @arg DCMIPP_CSI_IT_EESCDL1 Escape entry error on data line 1 interrupt 1706 * @arg DCMIPP_CSI_IT_ESOTSYNCDL1 SOT synchronization error on data line 1 interrupt 1707 * @arg DCMIPP_CSI_IT_ESOTDL1 SOT error on data line 1 interrupt 1708 * @arg DCMIPP_CSI_IT_ECTRLDL0 Error control on data line 0 interrupt 1709 * @arg DCMIPP_CSI_IT_ESYNCESCDL0 Low-power data transmission synchronization error on data line 0 interrupt 1710 * @arg DCMIPP_CSI_IT_EESCDL0 Escape entry error on data line 0 interrupt 1711 * @arg DCMIPP_CSI_IT_ESOTSYNCDL0 SOT synchronization error on data line 0 interrupt 1712 * @arg DCMIPP_CSI_IT_ESOTDL0 SOT error on data line 0 interrupt 1713 * @retval None 1714 */ 1715 #define __HAL_DCMIPP_CSI_DPHY_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->IER1 &= ~(__INTERRUPT__)) 1716 /** 1717 * @brief Get the DCMIPP CSI DPHY pending interrupt flags. 1718 * @param __HANDLE__ CSI handle 1719 * @param __FLAG__ Get the specified flag. 1720 * This parameter can be any combination of the following values: 1721 * @arg DCMIPP_CSI_FLAG_ECTRLDL1 Error control on data line 1 flag 1722 * @arg DCMIPP_CSI_FLAG_ESYNCESCDL1 Low-power data transmission synchronization error on data line 1 flag 1723 * @arg DCMIPP_CSI_FLAG_EESCDL1 Escape entry error on data line 1 flag 1724 * @arg DCMIPP_CSI_FLAG_ESOTSYNCDL1 SOT synchronization error on data line 1 flag 1725 * @arg DCMIPP_CSI_FLAG_ESOTDL1 SOT error on data line 1 flag 1726 * @arg DCMIPP_CSI_FLAG_ECTRLDL0 Error control on data line 0 flag 1727 * @arg DCMIPP_CSI_FLAG_ESYNCESCDL0 Low-power data transmission synchronization error on data line 0 flag 1728 * @arg DCMIPP_CSI_FLAG_EESCDL0 Escape entry error on data line 0 flag 1729 * @arg DCMIPP_CSI_FLAG_ESOTSYNCDL0 SOT synchronization error on data line 0 flag 1730 * @arg DCMIPP_CSI_FLAG_ESOTDL0 SOT error on data line 0 flag 1731 * @retval None 1732 */ 1733 #define __HAL_DCMIPP_CSI_GET_DPHY_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->IER1 & (__FLAG__)) 1734 /** 1735 * @brief Clear the DCMIPP CSI DPHY pending interrupt flags. 1736 * @param __HANDLE__ CSI handle 1737 * @param __FLAG__ specifies the flag to clear. 1738 * This parameter can be any combination of the following values: 1739 * @arg DCMIPP_CSI_FLAG_ECTRLDL1 Error control on data line 1 flag 1740 * @arg DCMIPP_CSI_FLAG_ESYNCESCDL1 Low-power data transmission synchronization error on data line 1 flag 1741 * @arg DCMIPP_CSI_FLAG_EESCDL1 Escape entry error on data line 1 flag 1742 * @arg DCMIPP_CSI_FLAG_ESOTSYNCDL1 SOT synchronization error on data line 1 flag 1743 * @arg DCMIPP_CSI_FLAG_ESOTDL1 SOT error on data line 1 flag 1744 * @arg DCMIPP_CSI_FLAG_ECTRLDL0 Error control on data line 0 flag 1745 * @arg DCMIPP_CSI_FLAG_ESYNCESCDL0 Low-power data transmission synchronization error on data line 0 flag 1746 * @arg DCMIPP_CSI_FLAG_EESCDL0 Escape entry error on data line 0 flag 1747 * @arg DCMIPP_CSI_FLAG_ESOTSYNCDL0 SOT synchronization error on data line 0 flag 1748 * @arg DCMIPP_CSI_FLAG_ESOTDL0 SOT error on data line 0 flag 1749 * @retval None 1750 */ 1751 #define __HAL_DCMIPP_CSI_CLEAR_DPHY_FLAG(__HANDLE__, __FLAG__)((__HANDLE__)->FCR1 = (__FLAG__)) 1752 /** 1753 * @brief Checks whether the specified DCMIPP CSI DPHY interrupt is enabled or not. 1754 * @param __HANDLE__ CSI handle 1755 * @param __INTERRUPT__ specifies the DCMIPP CSI D-PHY interrupt sources to be checked. 1756 * This parameter can be any combination of the following values: 1757 * @arg DCMIPP_CSI_IT_ECTRLDL1 Error control on data line 1 interrupt 1758 * @arg DCMIPP_CSI_IT_ESYNCESCDL1 Low-power data transmission synchronization error on data line 1 interrupt 1759 * @arg DCMIPP_CSI_IT_EESCDL1 Escape entry error on data line 1 interrupt 1760 * @arg DCMIPP_CSI_IT_ESOTSYNCDL1 SOT synchronization error on data line 1 interrupt 1761 * @arg DCMIPP_CSI_IT_ESOTDL1 SOT error on data line 1 interrupt 1762 * @arg DCMIPP_CSI_IT_ECTRLDL0 Error control on data line 0 interrupt 1763 * @arg DCMIPP_CSI_IT_ESYNCESCDL0 Low-power data transmission synchronization error on data line 0 interrupt 1764 * @arg DCMIPP_CSI_IT_EESCDL0 Escape entry error on data line 0 interrupt 1765 * @arg DCMIPP_CSI_IT_ESOTSYNCDL0 SOT synchronization error on data line 0 interrupt 1766 * @arg DCMIPP_CSI_IT_ESOTDL0 SOT error on data line 0 interrupt 1767 * @retval None 1768 */ 1769 #define __HAL_DCMIPP_CSI_GET_DPHY_IT_SOURCE(__HANDLE__, __INTERRUPT__)((((__HANDLE__)->IER1 & (__INTERRUPT__)) == \ 1770 (__INTERRUPT__)) ? SET : RESET) 1771 /** 1772 * @} 1773 */ 1774 /* Exported functions --------------------------------------------------------*/ 1775 /** @addtogroup DCMIPP_Exported_Functions 1776 * @{ 1777 */ 1778 1779 /** @addtogroup DCMIPP_Initialization_De-Initialization_Functions DCMIPP Initialization De-Initialization Functions 1780 * @brief Initialization and De-Initialization Functions 1781 * @{ 1782 */ 1783 HAL_StatusTypeDef HAL_DCMIPP_Init(DCMIPP_HandleTypeDef *hdcmipp); 1784 HAL_StatusTypeDef HAL_DCMIPP_DeInit(DCMIPP_HandleTypeDef *hdcmipp); 1785 void HAL_DCMIPP_MspInit(DCMIPP_HandleTypeDef *hdcmipp); 1786 void HAL_DCMIPP_MspDeInit(DCMIPP_HandleTypeDef *hdcmipp); 1787 /** 1788 * @} 1789 */ 1790 1791 /** @defgroup DCMIPP_Configuration_Functions DCMIPP Configuration Functions 1792 * @brief Configuration Functions 1793 * @{ 1794 */ 1795 1796 HAL_StatusTypeDef HAL_DCMIPP_PARALLEL_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, 1797 const DCMIPP_ParallelConfTypeDef *pParallelConfig); 1798 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, 1799 uint32_t Pipe, const DCMIPP_CSI_PIPE_ConfTypeDef *pCSI_PipeConfig); 1800 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetConfig(const DCMIPP_HandleTypeDef *hdcmipp, 1801 const DCMIPP_CSI_ConfTypeDef *pCSI_Config); 1802 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetVCFilteringConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel, 1803 const DCMIPP_CSI_VCFilteringConfTypeDef *pVCFilteringConfig); 1804 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetVCConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel, 1805 uint32_t DataTypeFormat); 1806 1807 1808 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1809 const DCMIPP_PipeConfTypeDef *pPipeConfig); 1810 HAL_StatusTypeDef HAL_DCMIPP_SetIPPlugConfig(DCMIPP_HandleTypeDef *hdcmipp, 1811 const DCMIPP_IPPlugConfTypeDef *pIPPlugConfig); 1812 /** 1813 * @} 1814 */ 1815 1816 /** @addtogroup DCMIPP_IO_operation_Functions DCMIPP IO operation Functions 1817 * @brief IO Operation Functions 1818 * @{ 1819 */ 1820 HAL_StatusTypeDef HAL_DCMIPP_PIPE_Start(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t DstAddress, 1821 uint32_t CaptureMode); 1822 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t DstAddress0, 1823 uint32_t DstAddress1, uint32_t CaptureMode); 1824 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_Start(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t VirtualChannel, 1825 uint32_t DstAddress, uint32_t CaptureMode); 1826 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_DoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1827 uint32_t VirtualChannel, uint32_t DstAddress0, 1828 uint32_t DstAddress1, uint32_t CaptureMode); 1829 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SemiPlanarStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1830 DCMIPP_SemiPlanarDstAddressTypeDef *pSemiPlanarDstAddress, 1831 uint32_t CaptureMode); 1832 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SemiPlanarDoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1833 DCMIPP_SemiPlanarDstAddressTypeDef 1834 *pSemiPlanarDstAddress0, 1835 DCMIPP_SemiPlanarDstAddressTypeDef 1836 *pSemiPlanarDstAddress1, uint32_t CaptureMode); 1837 HAL_StatusTypeDef HAL_DCMIPP_PIPE_FullPlanarStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1838 DCMIPP_FullPlanarDstAddressTypeDef *pFullPlanarDstAddress, 1839 uint32_t CaptureMode); 1840 HAL_StatusTypeDef HAL_DCMIPP_PIPE_FullPlanarDoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1841 DCMIPP_FullPlanarDstAddressTypeDef 1842 *pFullPlanarDstAddress0, 1843 DCMIPP_FullPlanarDstAddressTypeDef 1844 *pFullPlanarDstAddress1, uint32_t CaptureMode); 1845 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_SemiPlanarStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1846 uint32_t VirtualChannel, 1847 DCMIPP_SemiPlanarDstAddressTypeDef *pSemiPlanarDstAddress, 1848 uint32_t CaptureMode); 1849 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_SemiPlanarDoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1850 uint32_t VirtualChannel, 1851 DCMIPP_SemiPlanarDstAddressTypeDef 1852 *pSemiPlanarDstAddress0, 1853 DCMIPP_SemiPlanarDstAddressTypeDef 1854 *pSemiPlanarDstAddress1, uint32_t CaptureMode); 1855 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_FullPlanarStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1856 uint32_t VirtualChannel, 1857 DCMIPP_FullPlanarDstAddressTypeDef *pFullPlanarDstAddress, 1858 uint32_t CaptureMode); 1859 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_FullPlanarDoubleBufferStart(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1860 uint32_t VirtualChannel, 1861 DCMIPP_FullPlanarDstAddressTypeDef 1862 *pFullPlanarDstAddress0, 1863 DCMIPP_FullPlanarDstAddressTypeDef 1864 *pFullPlanarDstAddress1, 1865 uint32_t CaptureMode); 1866 HAL_StatusTypeDef HAL_DCMIPP_PIPE_Stop(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1867 HAL_StatusTypeDef HAL_DCMIPP_CSI_PIPE_Stop(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t VirtualChannel); 1868 HAL_StatusTypeDef HAL_DCMIPP_PIPE_Suspend(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1869 HAL_StatusTypeDef HAL_DCMIPP_PIPE_Resume(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1870 1871 /** 1872 * @} 1873 */ 1874 1875 /** @addtogroup DCMIPP_IRQ_and_Callbacks_Functions DCMIPP IRQ and Callbacks Functions 1876 * @brief IRQ and Callbacks functions 1877 * @{ 1878 */ 1879 /** @addtogroup DCMIPP_IRQHandler_Function IRQHandler Function 1880 * @{ 1881 */ 1882 void HAL_DCMIPP_IRQHandler(DCMIPP_HandleTypeDef *hdcmipp); 1883 void HAL_DCMIPP_CSI_IRQHandler(DCMIPP_HandleTypeDef *hdcmipp); 1884 /** 1885 * @} 1886 */ 1887 /** @addtogroup DCMIPP_Callback_Functions Callback Functions 1888 * @{ 1889 */ 1890 void HAL_DCMIPP_PIPE_FrameEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1891 void HAL_DCMIPP_PIPE_VsyncEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1892 void HAL_DCMIPP_PIPE_LineEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1893 void HAL_DCMIPP_PIPE_LimitEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1894 void HAL_DCMIPP_PIPE_ErrorCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1895 void HAL_DCMIPP_ErrorCallback(DCMIPP_HandleTypeDef *hdcmipp); 1896 /** 1897 * @} 1898 */ 1899 1900 /** @addtogroup DCMIPP_CSI_Callback_Functions CSI Callback Functions 1901 * @{ 1902 */ 1903 void HAL_DCMIPP_CSI_StartOfFrameEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel); 1904 void HAL_DCMIPP_CSI_EndOfFrameEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t VirtualChannel); 1905 void HAL_DCMIPP_CSI_TimerCounterEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Timer); 1906 void HAL_DCMIPP_CSI_LineByteEventCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter); 1907 void HAL_DCMIPP_CSI_LineErrorCallback(DCMIPP_HandleTypeDef *hdcmipp, uint32_t DataLane); 1908 void HAL_DCMIPP_CSI_ClockChangerFifoFullEventCallback(DCMIPP_HandleTypeDef *hdcmipp); 1909 void HAL_DCMIPP_CSI_ShortPacketDetectionEventCallback(DCMIPP_HandleTypeDef *hdcmipp); 1910 /** 1911 * @} 1912 */ 1913 /** @addtogroup DCMIPP_RegisterCallback_Functions Register Callback Functions 1914 * @{ 1915 */ 1916 /* Callbacks Register/UnRegister functions ***********************************/ 1917 #if (USE_HAL_DCMIPP_REGISTER_CALLBACKS == 1) 1918 HAL_StatusTypeDef HAL_DCMIPP_RegisterCallback(DCMIPP_HandleTypeDef *hdcmipp, HAL_DCMIPP_CallbackIDTypeDef CallbackID, 1919 pDCMIPP_CallbackTypeDef pCallback); 1920 HAL_StatusTypeDef HAL_DCMIPP_UnRegisterCallback(DCMIPP_HandleTypeDef *hdcmipp, 1921 HAL_DCMIPP_CallbackIDTypeDef CallbackID); 1922 1923 HAL_StatusTypeDef HAL_DCMIPP_PIPE_RegisterCallback(DCMIPP_HandleTypeDef *hdcmipp, 1924 HAL_DCMIPP_PIPE_CallbackIDTypeDef CallbackID, 1925 pDCMIPP_PIPE_CallbackTypeDef pCallback); 1926 HAL_StatusTypeDef HAL_DCMIPP_PIPE_UnRegisterCallback(DCMIPP_HandleTypeDef *hdcmipp, 1927 HAL_DCMIPP_PIPE_CallbackIDTypeDef CallbackID); 1928 #endif /* USE_HAL_DCMIPP_REGISTER_CALLBACKS */ 1929 /** 1930 * @} 1931 */ 1932 1933 /** 1934 * @} 1935 */ 1936 1937 /** @defgroup DCMIPP_Decimation_Functions DCMIPP Decimation Functions 1938 * @{ 1939 */ 1940 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetBytesDecimationConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1941 uint32_t SelectStart, uint32_t SelectMode); 1942 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetLinesDecimationConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1943 uint32_t SelectStart, uint32_t SelectMode); 1944 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPDecimationConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1945 const DCMIPP_DecimationConfTypeDef *pDecConfig); 1946 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPDecimation(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1947 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPDecimation(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1948 1949 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetDecimationConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1950 const DCMIPP_DecimationConfTypeDef *pDecConfig); 1951 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableDecimation(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1952 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableDecimation(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1953 /** 1954 * @} 1955 */ 1956 /** @defgroup DCMIPP_Crop_Functions DCMIPP Crop Functions 1957 * @{ 1958 */ 1959 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetCropConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1960 const DCMIPP_CropConfTypeDef *pCropConfig); 1961 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableCrop(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1962 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableCrop(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1963 /** 1964 * @} 1965 */ 1966 /** @defgroup DCMIPP_Line_Event_Functions DCMIPP Line Event Functions 1967 * @{ 1968 */ 1969 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableLineEvent(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t Line); 1970 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableLineEvent(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1971 /** 1972 * @} 1973 */ 1974 /** @defgroup DCMIPP_LimitEvent_Functions DCMIPP Limit Event Functions 1975 * @{ 1976 */ 1977 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableLimitEvent(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t Limit); 1978 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableLimitEvent(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1979 /** 1980 * @} 1981 */ 1982 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPStatisticExtractionConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1983 uint8_t ModuleID, const 1984 DCMIPP_StatisticExtractionConfTypeDef 1985 *pStatisticExtractionConfig); 1986 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPAreaStatisticExtractionConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1987 const DCMIPP_StatisticExtractionAreaConfTypeDef 1988 *pStatisticExtractionAreaConfig); 1989 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPStatisticExtraction(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1990 uint8_t ModuleID); 1991 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPStatisticExtraction(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1992 uint8_t ModuleID); 1993 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPAreaStatisticExtraction(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1994 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPAreaStatisticExtraction(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1995 1996 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetDownsizeConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 1997 const DCMIPP_DownsizeTypeDef *pDownsizeConfig); 1998 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableDownsize(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 1999 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableDownsize(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2000 2001 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPBlackLevelCalibrationConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2002 const DCMIPP_BlackLevelConfTypeDef 2003 *pBlackLevelConfig); 2004 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPBlackLevelCalibration(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2005 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPBlackLevelCalibration(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2006 2007 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableGammaConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2008 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableGammaConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2009 uint32_t HAL_DCMIPP_PIPE_IsEnabledGammaConversion(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2010 2011 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPBadPixelRemovalConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2012 uint32_t Strength); 2013 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPBadPixelRemoval(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2014 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPBadPixelRemoval(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2015 2016 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPCtrlContrastConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2017 const DCMIPP_ContrastConfTypeDef *pContrastConfig); 2018 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPCtrlContrast(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2019 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPCtrlContrast(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2020 2021 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetRegionOfInterestConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2022 const DCMIPP_RegionOfInterestConfTypeDef *pROIConfig); 2023 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableRegionOfInterest(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2024 uint32_t Region); 2025 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableRegionOfInterest(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2026 uint32_t Region); 2027 2028 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetLineWrappingConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2029 uint32_t AddressWrap); 2030 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableLineWrapping(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2031 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableLineWrapping(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2032 2033 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPExposureConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2034 const DCMIPP_ExposureConfTypeDef *pExposureConfig); 2035 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPExposure(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2036 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPExposure(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2037 2038 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPRemovalStatisticConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2039 uint32_t NbFirstLines, uint32_t NbLastLines); 2040 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPRemovalStatistic(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2041 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPRemovalStatistic(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2042 2043 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPRawBayer2RGBConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2044 const DCMIPP_RawBayer2RGBConfTypeDef *pRawBayer2RGBConfig); 2045 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPRawBayer2RGB(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2046 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPRawBayer2RGB(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2047 2048 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetYUVConversionConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2049 const DCMIPP_ColorConversionConfTypeDef 2050 *pColorConversionConfig); 2051 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableYUVConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2052 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableYUVConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2053 2054 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetISPColorConversionConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2055 const DCMIPP_ColorConversionConfTypeDef 2056 *pColorConversionConfig); 2057 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableISPColorConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2058 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableISPColorConversion(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2059 2060 void HAL_DCMIPP_PIPE_GetISPDecimationConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2061 DCMIPP_DecimationConfTypeDef *pDecConfig); 2062 void HAL_DCMIPP_PIPE_GetISPBlackLevelCalibrationConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2063 DCMIPP_BlackLevelConfTypeDef *pBlackLevelConfig); 2064 uint32_t HAL_DCMIPP_PIPE_GetISPBadPixelRemovalConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2065 void HAL_DCMIPP_PIPE_GetISPStatisticExtractionConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2066 uint8_t ModuleID, 2067 DCMIPP_StatisticExtractionConfTypeDef 2068 *pStatisticExtractionConfig); 2069 void HAL_DCMIPP_PIPE_GetISPAreaStatisticExtractionConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2070 DCMIPP_StatisticExtractionAreaConfTypeDef 2071 *pStatisticExtractionAreaConfig); 2072 void HAL_DCMIPP_PIPE_GetISPCtrlContrastConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2073 DCMIPP_ContrastConfTypeDef *pContrastConfig); 2074 void HAL_DCMIPP_PIPE_GetISPExposureConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2075 DCMIPP_ExposureConfTypeDef *pExposureConfig); 2076 void HAL_DCMIPP_PIPE_GetISPRawBayer2RGBConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2077 DCMIPP_RawBayer2RGBConfTypeDef *pRawBayer2RGBConfig); 2078 void HAL_DCMIPP_PIPE_GetISPColorConversionConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2079 DCMIPP_ColorConversionConfTypeDef *pColorConversionConfig); 2080 void HAL_DCMIPP_PIPE_GetISPRemovalStatisticConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2081 uint32_t *NbFirstLines, uint32_t *NbLastLines); 2082 2083 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPRemovalStatistic(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2084 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPBadPixelRemoval(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2085 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPDecimation(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2086 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPBlackLevelCalibration(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2087 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPExposure(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2088 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPRawBayer2RGB(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2089 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPColorConversion(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2090 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPCtrlContrast(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2091 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPStatisticExtraction(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2092 uint8_t ModuleID); 2093 uint32_t HAL_DCMIPP_PIPE_IsEnabledISPAreaStatisticExtraction(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2094 2095 2096 /** @defgroup DCMIPP_PeripheralControl_Functions DCMIPP Peripheral Control Functions 2097 * @{ 2098 */ 2099 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetFrameRate(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t FrameRate); 2100 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetCaptureMode(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t CaptureMode); 2101 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableCapture(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2102 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetMemoryAddress(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t Memory, 2103 uint32_t DstAddress); 2104 HAL_StatusTypeDef HAL_DCMIPP_PIPE_PARALLEL_SetInputPixelFormat(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2105 uint32_t InputPixelFormat); 2106 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetPitch(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t LinePitch); 2107 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetPixelPackerFormat(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2108 uint32_t PixelPackerFormat); 2109 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_EnableShare(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2110 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_DisableShare(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2111 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_ForceDataTypeFormat(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2112 uint32_t DataTypeFormat); 2113 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_SetDTMode(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2114 uint32_t DataTypeMode); 2115 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_SetDTSelection(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t DataTypeID, 2116 uint32_t DataType); 2117 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_EnableHeader(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2118 HAL_StatusTypeDef HAL_DCMIPP_PIPE_CSI_DisableHeader(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2119 HAL_StatusTypeDef HAL_DCMIPP_PARALLEL_SetSyncUnmask(DCMIPP_HandleTypeDef *hdcmipp, 2120 const DCMIPP_EmbeddedSyncUnmaskTypeDef *SyncUnmask); 2121 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetLineByteCounterConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter, 2122 const DCMIPP_CSI_LineByteCounterConfTypeDef *pLineByteConfig); 2123 HAL_StatusTypeDef HAL_DCMIPP_CSI_EnableLineByteCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter); 2124 HAL_StatusTypeDef HAL_DCMIPP_CSI_DisableLineByteCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter); 2125 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetTimerConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Timer, 2126 const DCMIPP_CSI_TimerConfTypeDef *TimerConfig); 2127 HAL_StatusTypeDef HAL_DCMIPP_CSI_EnableTimer(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Timer); 2128 HAL_StatusTypeDef HAL_DCMIPP_CSI_DisableTimer(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Timer); 2129 HAL_StatusTypeDef HAL_DCMIPP_CSI_SetWatchdogCounterConfig(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Counter); 2130 2131 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableComponentsSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2132 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableComponentsSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2133 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableRedBlueSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2134 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableRedBlueSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2135 HAL_StatusTypeDef HAL_DCMIPP_PIPE_DisableYUVSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2136 HAL_StatusTypeDef HAL_DCMIPP_PIPE_EnableYUVSwap(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2137 /** 2138 * @} 2139 */ 2140 2141 /** @defgroup DCMIPP_Frame_Counter_Functions DCMIPP Frame Counter Functions 2142 * @{ 2143 */ 2144 HAL_StatusTypeDef HAL_DCMIPP_PIPE_SetFrameCounterConfig(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2145 HAL_StatusTypeDef HAL_DCMIPP_PIPE_ResetFrameCounter(DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2146 HAL_StatusTypeDef HAL_DCMIPP_PIPE_ReadFrameCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2147 uint32_t *pCounter); 2148 /** 2149 * @} 2150 */ 2151 /** @defgroup DCMIPP_Data_Counter_Functions DCMIPP Data Counter Functions 2152 * @{ 2153 */ 2154 HAL_StatusTypeDef HAL_DCMIPP_PIPE_GetDataCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2155 uint32_t *pCounter); 2156 /** 2157 * @} 2158 */ 2159 HAL_StatusTypeDef HAL_DCMIPP_PIPE_GetISPRemovedBadPixelCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2160 uint32_t *pCounter); 2161 HAL_StatusTypeDef HAL_DCMIPP_PIPE_GetISPAccumulatedStatisticsCounter(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, 2162 uint8_t ModuleID, uint32_t *pCounter); 2163 uint32_t HAL_DCMIPP_GetMode(const DCMIPP_HandleTypeDef *hdcmipp); 2164 uint32_t HAL_DCMIPP_PIPE_GetMemoryAddress(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe, uint32_t MemoryAddress); 2165 2166 /** @addtogroup DCMIPP_State_and_Error_Functions DCMIPP State and Error Functions 2167 * @{ 2168 */ 2169 HAL_DCMIPP_StateTypeDef HAL_DCMIPP_GetState(const DCMIPP_HandleTypeDef *hdcmipp); 2170 HAL_DCMIPP_PipeStateTypeDef HAL_DCMIPP_PIPE_GetState(const DCMIPP_HandleTypeDef *hdcmipp, uint32_t Pipe); 2171 uint32_t HAL_DCMIPP_GetError(const DCMIPP_HandleTypeDef *hdcmipp); 2172 2173 /** 2174 * @} 2175 */ 2176 /** 2177 * @} 2178 */ 2179 2180 /* Private macros ------------------------------------------------------------*/ 2181 /** @defgroup DCMIPP_Private_Macros DCMIPP Private Macros 2182 * @{ 2183 */ 2184 #define IS_DCMIPP_PIPE(PIPE) (((PIPE) == DCMIPP_PIPE0) || \ 2185 ((PIPE) == DCMIPP_PIPE1) || \ 2186 ((PIPE) == DCMIPP_PIPE2)) 2187 #define IS_DCMIPP_FORMAT(FORMAT) (((FORMAT) == DCMIPP_FORMAT_BYTE) ||\ 2188 ((FORMAT) == DCMIPP_FORMAT_YUV422) ||\ 2189 ((FORMAT) == DCMIPP_FORMAT_RGB565) ||\ 2190 ((FORMAT) == DCMIPP_FORMAT_RGB666) ||\ 2191 ((FORMAT) == DCMIPP_FORMAT_RGB888) ||\ 2192 ((FORMAT) == DCMIPP_FORMAT_RAW8 ) ||\ 2193 ((FORMAT) == DCMIPP_FORMAT_RAW10 ) ||\ 2194 ((FORMAT) == DCMIPP_FORMAT_RAW12 ) ||\ 2195 ((FORMAT) == DCMIPP_FORMAT_RAW14 ) ||\ 2196 ((FORMAT) == DCMIPP_FORMAT_MONOCHROME_8B) ||\ 2197 ((FORMAT) == DCMIPP_FORMAT_MONOCHROME_10B) ||\ 2198 ((FORMAT) == DCMIPP_FORMAT_MONOCHROME_12B) ||\ 2199 ((FORMAT) == DCMIPP_FORMAT_MONOCHROME_14B)) 2200 2201 #define IS_DCMIPP_PIXEL_PACKER_FORMAT(FORMAT) (((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_RGB888_YUV444_1) ||\ 2202 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_RGB565_1) ||\ 2203 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_ARGB8888) ||\ 2204 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_RGBA888) ||\ 2205 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_MONO_Y8_G8_1) ||\ 2206 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_YUV444_1) ||\ 2207 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1) ||\ 2208 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_YUV422_2) ||\ 2209 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_YUV420_2) ||\ 2210 ((FORMAT) == DCMIPP_PIXEL_PACKER_FORMAT_YUV420_3)) 2211 2212 #define IS_DCMIPP_PIXEL_PIPE_PITCH(PITCH) ((((PITCH) & 0xFU) == 0U) && ((PITCH) <= 0x7FFFU)) 2213 2214 #define IS_DCMIPP_PCKPOLARITY(POLARITY)(((POLARITY) == DCMIPP_PCKPOLARITY_FALLING) || \ 2215 ((POLARITY) == DCMIPP_PCKPOLARITY_RISING)) 2216 2217 #define IS_DCMIPP_VSPOLARITY(POLARITY)(((POLARITY) == DCMIPP_VSPOLARITY_LOW) || \ 2218 ((POLARITY) == DCMIPP_VSPOLARITY_HIGH)) 2219 2220 #define IS_DCMIPP_HSPOLARITY(POLARITY)(((POLARITY) == DCMIPP_HSPOLARITY_LOW) || \ 2221 ((POLARITY) == DCMIPP_HSPOLARITY_HIGH)) 2222 2223 2224 #define IS_DCMIPP_EXTENDED_DATA_MODE(INTERFACE)(((INTERFACE) == DCMIPP_INTERFACE_8BITS ) ||\ 2225 ((INTERFACE) == DCMIPP_INTERFACE_10BITS) ||\ 2226 ((INTERFACE) == DCMIPP_INTERFACE_12BITS) ||\ 2227 ((INTERFACE) == DCMIPP_INTERFACE_14BITS) ||\ 2228 ((INTERFACE) == DCMIPP_INTERFACE_16BITS)) 2229 2230 #define IS_DCMIPP_SYNC_MODE(SYNC_MODE) (((SYNC_MODE) == DCMIPP_SYNCHRO_HARDWARE) ||\ 2231 ((SYNC_MODE) == DCMIPP_SYNCHRO_EMBEDDED)) 2232 2233 #define IS_DCMIPP_SWAP_BITS(SWAP_BITS) (((SWAP_BITS) == DCMIPP_SWAPBITS_ENABLE) ||\ 2234 ((SWAP_BITS) == DCMIPP_SWAPBITS_DISABLE)) 2235 2236 #define IS_DCMIPP_SWAP_CYCLES(SWAP_CYCLES) (((SWAP_CYCLES) == DCMIPP_SWAPCYCLES_ENABLE) ||\ 2237 ((SWAP_CYCLES) == DCMIPP_SWAPCYCLES_DISABLE)) 2238 2239 #define IS_DCMIPP_VCID(VCID) (((VCID) == DCMIPP_VIRTUAL_CHANNEL0) ||\ 2240 ((VCID) == DCMIPP_VIRTUAL_CHANNEL1) ||\ 2241 ((VCID) == DCMIPP_VIRTUAL_CHANNEL2) ||\ 2242 ((VCID) == DCMIPP_VIRTUAL_CHANNEL3)) 2243 2244 #define IS_DCMIPP_DATA_TYPE_MODE(DATA_TYPE_MODE) (((DATA_TYPE_MODE) == DCMIPP_DTMODE_DTIDA) ||\ 2245 ((DATA_TYPE_MODE) == DCMIPP_DTMODE_DTIDA_OR_DTIDB) ||\ 2246 ((DATA_TYPE_MODE) == DCMIPP_DTMODE_ALL_EXCEPT_DTIA_DTIB) ||\ 2247 ((DATA_TYPE_MODE) == DCMIPP_DTMODE_ALL)) 2248 2249 #define IS_DCMIPP_DATA_TYPE(DATA_TYPE) (((DATA_TYPE) == DCMIPP_DT_RGB565) ||\ 2250 ((DATA_TYPE) == DCMIPP_DT_RGB444) ||\ 2251 ((DATA_TYPE) == DCMIPP_DT_RGB555) ||\ 2252 ((DATA_TYPE) == DCMIPP_DT_RGB666) ||\ 2253 ((DATA_TYPE) == DCMIPP_DT_RGB888) ||\ 2254 ((DATA_TYPE) == DCMIPP_DT_YUV420_8) ||\ 2255 ((DATA_TYPE) == DCMIPP_DT_YUV420_10) ||\ 2256 ((DATA_TYPE) == DCMIPP_DT_YUV422_8) ||\ 2257 ((DATA_TYPE) == DCMIPP_DT_YUV422_10) ||\ 2258 ((DATA_TYPE) == DCMIPP_DT_RAW8) ||\ 2259 ((DATA_TYPE) == DCMIPP_DT_RAW10) ||\ 2260 ((DATA_TYPE) == DCMIPP_DT_RAW12) ||\ 2261 ((DATA_TYPE) == DCMIPP_DT_RAW14)) 2262 2263 #define IS_DCMIPP_NUMBER_OF_LANES(DATA_LANE_NB) (((DATA_LANE_NB) == DCMIPP_CSI_ONE_DATA_LANE) ||\ 2264 ((DATA_LANE_NB) == DCMIPP_CSI_TWO_DATA_LANES)) 2265 2266 #define IS_DCMIPP_CSI_DATA_LANE_MAPPING(DATA_LANE_MAP) (((DATA_LANE_MAP) == DCMIPP_CSI_PHYSICAL_DATA_LANES) ||\ 2267 ((DATA_LANE_MAP) == DCMIPP_CSI_INVERTED_DATA_LANES)) 2268 #define IS_DCMIPP_CSI_DATA_PHY_BITRATE(PHY_BITRATE) ((PHY_BITRATE) <= DCMIPP_CSI_PHY_BT_2500) 2269 #define IS_DCMIPP_CSI_DATA_TYPE_NB(DATA_TYPE_NB) ((DATA_TYPE_NB) <= MAX_DATATYPE_NB) 2270 2271 #define IS_DCMIPP_CSI_DATA_TYPE_FORMAT(DATA_TYPE_FORMAT) (((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP6) ||\ 2272 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP7) ||\ 2273 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP8) ||\ 2274 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP10) ||\ 2275 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP12) ||\ 2276 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP14) ||\ 2277 ((DATA_TYPE_FORMAT) == DCMIPP_CSI_DT_BPP16)) 2278 #define IS_DCMIPP_CSI_DATA_CLASS(DATA_TYPE_CLASS)((DATA_TYPE_CLASS) <= 0x3FU) 2279 #define IS_DCMIPP_CSI_COUNTER(COUNTER) (((COUNTER) == DCMIPP_CSI_COUNTER0) ||\ 2280 ((COUNTER) == DCMIPP_CSI_COUNTER1) ||\ 2281 ((COUNTER) == DCMIPP_CSI_COUNTER2) ||\ 2282 ((COUNTER) == DCMIPP_CSI_COUNTER3)) 2283 #define IS_DCMIPP_CSI_LINE_COUNTER(LINE_COUNTER)((LINE_COUNTER) <= 0xFFFFU) 2284 #define IS_DCMIPP_CSI_BYTE_COUNTER(BYTE_COUNTER)((BYTE_COUNTER) <= 0xFFFFU) 2285 2286 #define IS_DCMIPP_CSI_TIMER(TIMER) (((TIMER) == DCMIPP_CSI_TIMER0) ||\ 2287 ((TIMER) == DCMIPP_CSI_TIMER1) ||\ 2288 ((TIMER) == DCMIPP_CSI_TIMER2) ||\ 2289 ((TIMER) == DCMIPP_CSI_TIMER3)) 2290 #define IS_DCMIPP_CSI_TIMER_START(TIMER_START) (((TIMER_START) == DCMIPP_CSI_TIMER_START_SOF)||\ 2291 ((TIMER_START) == DCMIPP_CSI_TIMER_START_EOF)) 2292 2293 2294 #define IS_DCMIPP_FRAME_RATE(FRAME_RATE) (((FRAME_RATE) == DCMIPP_FRAME_RATE_ALL) ||\ 2295 ((FRAME_RATE) == DCMIPP_FRAME_RATE_1_OVER_2) ||\ 2296 ((FRAME_RATE) == DCMIPP_FRAME_RATE_1_OVER_4) ||\ 2297 ((FRAME_RATE) == DCMIPP_FRAME_RATE_1_OVER_8)) 2298 #define IS_DCMIPP_CLIENT(CLIENT) (((CLIENT) == DCMIPP_CLIENT1) ||\ 2299 ((CLIENT) == DCMIPP_CLIENT2) ||\ 2300 ((CLIENT) == DCMIPP_CLIENT3) ||\ 2301 ((CLIENT) == DCMIPP_CLIENT4) ||\ 2302 ((CLIENT) == DCMIPP_CLIENT5)) 2303 2304 #define IS_DCMIPP_DPREG_END(DPREG_END) ((DPREG_END) <= 0x3FFU) 2305 #define IS_DCMIPP_DPREG_START(DPREG_START) ((DPREG_START) <= 0x3FFU) 2306 2307 #define IS_DCMIPP_MAX_OUTSTANDING_TRANSACTIONS(OUTS_TRANS) (((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_NONE )||\ 2308 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_2 )||\ 2309 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_3 )||\ 2310 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_4 )||\ 2311 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_5 )||\ 2312 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_6 )||\ 2313 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_7 )||\ 2314 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_8 )||\ 2315 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_9 )||\ 2316 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_10 )||\ 2317 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_11 )||\ 2318 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_12 )||\ 2319 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_13 )||\ 2320 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_14 )||\ 2321 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_15 )||\ 2322 ((OUTS_TRANS) == DCMIPP_OUTSTANDING_TRANSACTION_16 )) 2323 2324 #define IS_DCMIPP_MEMORY_PAGE_SIZE(MEMORY_PAGE_SIZE) (((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_64BYTES) ||\ 2325 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_128BYTES) ||\ 2326 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_256BYTES) ||\ 2327 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_512BYTES) ||\ 2328 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_1KBYTES) ||\ 2329 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_2KBYTES) ||\ 2330 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_4KBYTES) ||\ 2331 ((MEMORY_PAGE_SIZE) == DCMIPP_MEMORY_PAGE_SIZE_8KBYTES)) 2332 #define IS_DCMIPP_TRAFFIC(TRAFFIC) (((TRAFFIC) == DCMIPP_TRAFFIC_BURST_SIZE_8BYTES ) ||\ 2333 ((TRAFFIC) == DCMIPP_TRAFFIC_BURST_SIZE_16BYTES) ||\ 2334 ((TRAFFIC) == DCMIPP_TRAFFIC_BURST_SIZE_32BYTES) ||\ 2335 ((TRAFFIC) == DCMIPP_TRAFFIC_BURST_SIZE_64BYTES) ||\ 2336 ((TRAFFIC) == DCMIPP_TRAFFIC_BURST_SIZE_128BYTES)) 2337 #define IS_DCMIPP_WLRU_RATIO(WLRU_RATIO) ((WLRU_RATIO)<= 0xFU) 2338 2339 #define IS_DCMIPP_CAPTURE_MODE(CAPTURE_MODE) (((CAPTURE_MODE) == DCMIPP_MODE_CONTINUOUS)||\ 2340 ((CAPTURE_MODE) == DCMIPP_MODE_SNAPSHOT)) 2341 2342 #define IS_DCMIPP_PIPE_CROP_AREA(CROP_AREA)(((CROP_AREA) == DCMIPP_POSITIVE_AREA) ||\ 2343 ((CROP_AREA) == DCMIPP_NEGATIVE_AREA)) 2344 2345 #define IS_DCMIPP_PIPE_CROP_HSIZE(CROP_HSIZE) (((CROP_HSIZE) >= 0x1U) && ((CROP_HSIZE) <= 0xFFFU)) 2346 #define IS_DCMIPP_PIPE_CROP_VSIZE(CROP_VSIZE) (((CROP_VSIZE) >= 0x1U) && ((CROP_VSIZE) <= 0xFFFU)) 2347 #define IS_DCMIPP_PIPE_CROP_VSTART(CROP_VSTART) ((CROP_VSTART) <= 0xFFFU) 2348 #define IS_DCMIPP_PIPE_CROP_HSTART(CROP_HSTART) ((CROP_HSTART) <= 0xFFFU) 2349 2350 #define IS_DCMIPP_BYTE_SELECT_MODE(BYTE_SELECT) (((BYTE_SELECT) == DCMIPP_BSM_ALL) ||\ 2351 ((BYTE_SELECT) == DCMIPP_BSM_DATA_OUT_2) ||\ 2352 ((BYTE_SELECT) == DCMIPP_BSM_BYTE_OUT_4) ||\ 2353 ((BYTE_SELECT) == DCMIPP_BSM_2BYTE_OUT_4)) 2354 2355 #define IS_DCMIPP_BYTE_SELECT_START(BYTE_START)(((BYTE_START) == DCMIPP_OEBS_ODD) ||\ 2356 ((BYTE_START) == DCMIPP_OEBS_EVEN)) 2357 2358 #define IS_DCMIPP_LINE_SELECT_MODE(LINE_SELECT) (((LINE_SELECT) == DCMIPP_LSM_ALL) ||\ 2359 ((LINE_SELECT) == DCMIPP_LSM_ALTERNATE_2)) 2360 2361 #define IS_DCMIPP_LINE_SELECT_START(LINE__START)(((LINE__START) == DCMIPP_OELS_ODD) ||\ 2362 ((LINE__START) == DCMIPP_OELS_EVEN)) 2363 2364 #define IS_DCMIPP_MEMORY_ADDRESS(MEMORY_ADDRESS) (((MEMORY_ADDRESS) == DCMIPP_MEMORY_ADDRESS_0) ||\ 2365 ((MEMORY_ADDRESS) == DCMIPP_MEMORY_ADDRESS_1)) 2366 2367 #define IS_DCMIPP_DATA_LIMIT(DATA_LIMIT) (((DATA_LIMIT) >=1U ) && ((DATA_LIMIT) <= 0xFFFFFFU)) 2368 2369 #define IS_DCMIPP_PIPE_MULTILINE(MULTILINE) (((MULTILINE) == DCMIPP_MULTILINE_1_LINE ) ||\ 2370 ((MULTILINE) == DCMIPP_MULTILINE_2_LINES) ||\ 2371 ((MULTILINE) == DCMIPP_MULTILINE_4_LINES) ||\ 2372 ((MULTILINE) == DCMIPP_MULTILINE_8_LINES) ||\ 2373 ((MULTILINE) == DCMIPP_MULTILINE_16_LINES) ||\ 2374 ((MULTILINE) == DCMIPP_MULTILINE_32_LINES) ||\ 2375 ((MULTILINE) == DCMIPP_MULTILINE_64_LINES) ||\ 2376 ((MULTILINE) == DCMIPP_MULTILINE_128_LINES)) 2377 #define IS_DCMIPP_VRATIO(VRATIO) (((VRATIO) == DCMIPP_VDEC_ALL) ||\ 2378 ((VRATIO) == DCMIPP_VDEC_1_OUT_2) ||\ 2379 ((VRATIO) == DCMIPP_VDEC_1_OUT_4) ||\ 2380 ((VRATIO) == DCMIPP_VDEC_1_OUT_8)) 2381 2382 #define IS_DCMIPP_HRATIO(HRATIO) (((HRATIO) == DCMIPP_HDEC_ALL) ||\ 2383 ((HRATIO) == DCMIPP_HDEC_1_OUT_2) ||\ 2384 ((HRATIO) == DCMIPP_HDEC_1_OUT_4) ||\ 2385 ((HRATIO) == DCMIPP_HDEC_1_OUT_8)) 2386 2387 #define IS_DCMIPP_DOWSIZE_DIV_FACTOR(DIV_FACTOR) (((DIV_FACTOR)>=0x80U) && ((DIV_FACTOR)<= 0x3FFU)) 2388 #define IS_DCMIPP_DOWSIZE_RATIO(RATIO) ((RATIO)<= 0xFFFFU) 2389 #define IS_DCMIPP_DOWSIZE_SIZE(SIZE) ((SIZE) <= 0xFFFU) 2390 2391 #define IS_DCMIPP_RAWBAYER2RGB_RAW_TYPE(RAW_TYPE) (((RAW_TYPE) == DCMIPP_RAWBAYER_RGGB) ||\ 2392 ((RAW_TYPE) == DCMIPP_RAWBAYER_GRBG) ||\ 2393 ((RAW_TYPE) == DCMIPP_RAWBAYER_GBRG) ||\ 2394 ((RAW_TYPE) == DCMIPP_RAWBAYER_BGGR)) 2395 2396 #define IS_DCMIPP_RAWBAYER2RGB_STRENGTH(STRENGTH) (((STRENGTH) == DCMIPP_RAWBAYER_ALGO_NONE) ||\ 2397 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_3) ||\ 2398 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_4) ||\ 2399 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_6) ||\ 2400 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_8) ||\ 2401 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_12)||\ 2402 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_16)||\ 2403 ((STRENGTH) == DCMIPP_RAWBAYER_ALGO_STRENGTH_24)) 2404 2405 #define IS_DCMIPP_NB_FIRST_LINES(NB_FIRST_LINES) ((NB_FIRST_LINES) <= 7U) 2406 2407 #define IS_DCMIPP_NB_LAST_LINES(NB_LAST_LINES) ((NB_LAST_LINES) <= 0xFFFU) 2408 2409 #define IS_DCMIPP_BAD_PXL_REMOVAL_STRENGTH(STRENGTH) (((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_0) ||\ 2410 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_1) ||\ 2411 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_2) ||\ 2412 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_3) ||\ 2413 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_4) ||\ 2414 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_5) ||\ 2415 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_6) ||\ 2416 ((STRENGTH) == DCMIPP_BAD_PXL_REM_SRENGTH_7)) 2417 2418 #define IS_DCMIPP_ROI_COLOR(COLOR) ((COLOR) <= 3U) 2419 #define IS_DCMIPP_ROI_SIZE(SIZE) ((SIZE) <= 3U) 2420 #define IS_DCMIPP_ROI_START(START) ((START) <= 3U) 2421 #define IS_DCMIPP_ROI_LINE_WIDTH(LINE_WIDTH) ((LINE_WIDTH) <= DCMIPP_LINE_WIDTH_8PXL) 2422 #define IS_DCMIPP_ROI(REGION_OF_INTEREST) ((REGION_OF_INTEREST) <= DCMIPP_REGION_OF_INTEREST8) 2423 2424 #define IS_DCMIPP_ADDRESS_WRAP(ADDRESS_WRAP) (((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_1_LINE) ||\ 2425 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_2_LINES) ||\ 2426 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_4_LINES) ||\ 2427 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_8_LINES) ||\ 2428 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_16_LINES) ||\ 2429 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_32_LINES) ||\ 2430 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_64_LINES) ||\ 2431 ((ADDRESS_WRAP) == DCMIPP_WRAP_ADDRESS_128_LINES)) 2432 2433 #define IS_DCMIPP_OUTPUT_SAMPLES_TYPES(OUTPUT_SAMPLES_TYPES) (((OUTPUT_SAMPLES_TYPES) == DCMIPP_CLAMP_YUV) ||\ 2434 ((OUTPUT_SAMPLES_TYPES) == DCMIPP_CLAMP_RGB)) 2435 #define IS_DCMIPP_COLOR_CONVERSION_COEF(COLOR_CONV_CONF) ((COLOR_CONV_CONF) <= 0x7FF) 2436 2437 #define IS_DCMIPP_STAT_EXTRACTION_MODULE(MODULE) (((MODULE) == DCMIPP_STATEXT_MODULE1)||\ 2438 ((MODULE) == DCMIPP_STATEXT_MODULE2)||\ 2439 ((MODULE) == DCMIPP_STATEXT_MODULE3)) 2440 2441 #define IS_DCMIPP_LUMINANCE(LUMINANCE) ((LUMINANCE) <= 0x3FU) 2442 2443 #define IS_DCMIPP_EXPOSURE_SHF(CHIFT) ((CHIFT) <= 0x7U) 2444 2445 #define IS_DCMIPP_STAT_EXTRACTION_BINS(BINS) (((BINS) == DCMIPP_STAT_EXT_BINS_MODE_LOWER_BINS) ||\ 2446 ((BINS) == DCMIPP_STAT_EXT_BINS_MODE_LOWMID_BINS) ||\ 2447 ((BINS) == DCMIPP_STAT_EXT_BINS_MODE_UPMID_BINS ) ||\ 2448 ((BINS) == DCMIPP_STAT_EXT_BINS_MODE_UP_BINS ) ||\ 2449 ((BINS) == DCMIPP_STAT_EXT_AVER_MODE_ALL_PIXELS ) ||\ 2450 ((BINS) == DCMIPP_STAT_EXT_AVER_MODE_NOEXT16 ) ||\ 2451 ((BINS) == DCMIPP_STAT_EXT_AVER_MODE_NOEXT32 ) ||\ 2452 ((BINS) == DCMIPP_STAT_EXT_AVER_MODE_NOEXT64 )) 2453 2454 #define IS_DCMIPP_STAT_EXTRACTION_SOURCE(SOURCE) (((SOURCE) == DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_R) ||\ 2455 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_G) ||\ 2456 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_B) ||\ 2457 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_PRE_BLKLVL_L) ||\ 2458 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_R) ||\ 2459 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_G) ||\ 2460 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_B) ||\ 2461 ((SOURCE) == DCMIPP_STAT_EXT_SOURCE_POST_DEMOS_L)) 2462 2463 #define IS_DCMIPP_STAT_EXTRACTION_MODE(MODE) (((MODE) == DCMIPP_STAT_EXT_MODE_AVERAGE) ||\ 2464 ((MODE) == DCMIPP_STAT_EXT_MODE_BINS)) 2465 2466 #define IS_DCMIPP_PIPE_STAT_EXTRACTION_START(START) ((START) <= 0xFFFU) 2467 #define IS_DCMIPP_PIPE_STAT_EXTRACTION_SIZE(SIZE) ((SIZE) <= 0xFFFU) 2468 2469 /** 2470 * @} 2471 */ 2472 2473 /** 2474 * @} 2475 */ 2476 2477 #endif /* DCMIPP */ 2478 2479 /** 2480 * @} 2481 */ 2482 2483 #ifdef __cplusplus 2484 } 2485 #endif 2486 2487 #endif /* __STM32N6xx_HAL_DCMIPP_H */ 2488 2489