The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F746ZG/stm32f7xx_hal_jpeg.h@122:f9eeca106725, 2016-07-07 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 07 14:34:11 2016 +0100
- Revision:
- 122:f9eeca106725
Release 122 of the mbed library
Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 122:f9eeca106725 | 1 | /** |
Kojto | 122:f9eeca106725 | 2 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 3 | * @file stm32f7xx_hal_jpeg.h |
Kojto | 122:f9eeca106725 | 4 | * @author MCD Application Team |
Kojto | 122:f9eeca106725 | 5 | * @version V1.1.0 |
Kojto | 122:f9eeca106725 | 6 | * @date 22-April-2016 |
Kojto | 122:f9eeca106725 | 7 | * @brief Header file of JPEG HAL module. |
Kojto | 122:f9eeca106725 | 8 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 9 | * @attention |
Kojto | 122:f9eeca106725 | 10 | * |
Kojto | 122:f9eeca106725 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
Kojto | 122:f9eeca106725 | 12 | * |
Kojto | 122:f9eeca106725 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 122:f9eeca106725 | 14 | * are permitted provided that the following conditions are met: |
Kojto | 122:f9eeca106725 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 122:f9eeca106725 | 16 | * this list of conditions and the following disclaimer. |
Kojto | 122:f9eeca106725 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 122:f9eeca106725 | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 122:f9eeca106725 | 19 | * and/or other materials provided with the distribution. |
Kojto | 122:f9eeca106725 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 122:f9eeca106725 | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 122:f9eeca106725 | 22 | * without specific prior written permission. |
Kojto | 122:f9eeca106725 | 23 | * |
Kojto | 122:f9eeca106725 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 122:f9eeca106725 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 122:f9eeca106725 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 122:f9eeca106725 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 122:f9eeca106725 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 122:f9eeca106725 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 122:f9eeca106725 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 122:f9eeca106725 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 122:f9eeca106725 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 122:f9eeca106725 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 122:f9eeca106725 | 34 | * |
Kojto | 122:f9eeca106725 | 35 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 36 | */ |
Kojto | 122:f9eeca106725 | 37 | |
Kojto | 122:f9eeca106725 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 122:f9eeca106725 | 39 | #ifndef __STM32F7xx_HAL_JPEG_H |
Kojto | 122:f9eeca106725 | 40 | #define __STM32F7xx_HAL_JPEG_H |
Kojto | 122:f9eeca106725 | 41 | |
Kojto | 122:f9eeca106725 | 42 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 43 | extern "C" { |
Kojto | 122:f9eeca106725 | 44 | #endif |
Kojto | 122:f9eeca106725 | 45 | #if defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) |
Kojto | 122:f9eeca106725 | 46 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 47 | #include "stm32f7xx_hal_def.h" |
Kojto | 122:f9eeca106725 | 48 | |
Kojto | 122:f9eeca106725 | 49 | /** @addtogroup STM32F7xx_HAL_Driver |
Kojto | 122:f9eeca106725 | 50 | * @{ |
Kojto | 122:f9eeca106725 | 51 | */ |
Kojto | 122:f9eeca106725 | 52 | |
Kojto | 122:f9eeca106725 | 53 | /** @addtogroup JPEG |
Kojto | 122:f9eeca106725 | 54 | * @{ |
Kojto | 122:f9eeca106725 | 55 | */ |
Kojto | 122:f9eeca106725 | 56 | |
Kojto | 122:f9eeca106725 | 57 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 58 | /** @defgroup JPEG_Exported_Types JPEG Exported Types |
Kojto | 122:f9eeca106725 | 59 | * @{ |
Kojto | 122:f9eeca106725 | 60 | */ |
Kojto | 122:f9eeca106725 | 61 | |
Kojto | 122:f9eeca106725 | 62 | /** @defgroup JPEG_Configuration_Structure_definition JPEG Configuration for encoding Structure definition |
Kojto | 122:f9eeca106725 | 63 | * @brief JPEG encoding configuration Structure definition |
Kojto | 122:f9eeca106725 | 64 | * @{ |
Kojto | 122:f9eeca106725 | 65 | */ |
Kojto | 122:f9eeca106725 | 66 | typedef struct |
Kojto | 122:f9eeca106725 | 67 | { |
Kojto | 122:f9eeca106725 | 68 | uint8_t ColorSpace; /*!< Image Color space : gray-scale, YCBCR, RGB or CMYK |
Kojto | 122:f9eeca106725 | 69 | This parameter can be a value of @ref JPEG_ColorSpace_Type */ |
Kojto | 122:f9eeca106725 | 70 | |
Kojto | 122:f9eeca106725 | 71 | uint8_t ChromaSubsampling; /*!< Chroma Subsampling in case of YCBCR or CMYK color space, 0-> 4:4:4 , 1-> 4:2:2, 2 -> 4:1:1, 3 -> 4:2:0 |
Kojto | 122:f9eeca106725 | 72 | This parameter can be a value of @ref JPEG_ChromaSubsampling_Type */ |
Kojto | 122:f9eeca106725 | 73 | |
Kojto | 122:f9eeca106725 | 74 | uint32_t ImageHeight; /*!< Image height : number of lines */ |
Kojto | 122:f9eeca106725 | 75 | |
Kojto | 122:f9eeca106725 | 76 | uint32_t ImageWidth; /*!< Image width : number of pixels per line */ |
Kojto | 122:f9eeca106725 | 77 | |
Kojto | 122:f9eeca106725 | 78 | uint8_t ImageQuality; /*!< Quality of the JPEG encoding : from 1 to 100 */ |
Kojto | 122:f9eeca106725 | 79 | |
Kojto | 122:f9eeca106725 | 80 | }JPEG_ConfTypeDef; |
Kojto | 122:f9eeca106725 | 81 | /** |
Kojto | 122:f9eeca106725 | 82 | * @} |
Kojto | 122:f9eeca106725 | 83 | */ |
Kojto | 122:f9eeca106725 | 84 | |
Kojto | 122:f9eeca106725 | 85 | /** @defgroup HAL_JPEG_state_structure_definition HAL JPEG state structure definition |
Kojto | 122:f9eeca106725 | 86 | * @brief HAL JPEG State structure definition |
Kojto | 122:f9eeca106725 | 87 | * @{ |
Kojto | 122:f9eeca106725 | 88 | */ |
Kojto | 122:f9eeca106725 | 89 | typedef enum |
Kojto | 122:f9eeca106725 | 90 | { |
Kojto | 122:f9eeca106725 | 91 | HAL_JPEG_STATE_RESET = 0x00U, /*!< JPEG not yet initialized or disabled */ |
Kojto | 122:f9eeca106725 | 92 | HAL_JPEG_STATE_READY = 0x01U, /*!< JPEG initialized and ready for use */ |
Kojto | 122:f9eeca106725 | 93 | HAL_JPEG_STATE_BUSY = 0x02U, /*!< JPEG internal processing is ongoing */ |
Kojto | 122:f9eeca106725 | 94 | HAL_JPEG_STATE_BUSY_ENCODING = 0x03U, /*!< JPEG encoding processing is ongoing */ |
Kojto | 122:f9eeca106725 | 95 | HAL_JPEG_STATE_BUSY_DECODING = 0x04U, /*!< JPEG decoding processing is ongoing */ |
Kojto | 122:f9eeca106725 | 96 | HAL_JPEG_STATE_TIMEOUT = 0x05U, /*!< JPEG timeout state */ |
Kojto | 122:f9eeca106725 | 97 | HAL_JPEG_STATE_ERROR = 0x06U /*!< JPEG error state */ |
Kojto | 122:f9eeca106725 | 98 | }HAL_JPEG_STATETypeDef; |
Kojto | 122:f9eeca106725 | 99 | |
Kojto | 122:f9eeca106725 | 100 | /** |
Kojto | 122:f9eeca106725 | 101 | * @} |
Kojto | 122:f9eeca106725 | 102 | */ |
Kojto | 122:f9eeca106725 | 103 | |
Kojto | 122:f9eeca106725 | 104 | |
Kojto | 122:f9eeca106725 | 105 | /** @defgroup JPEG_handle_Structure_definition JPEG handle Structure definition |
Kojto | 122:f9eeca106725 | 106 | * @brief JPEG handle Structure definition |
Kojto | 122:f9eeca106725 | 107 | * @{ |
Kojto | 122:f9eeca106725 | 108 | */ |
Kojto | 122:f9eeca106725 | 109 | typedef struct |
Kojto | 122:f9eeca106725 | 110 | { |
Kojto | 122:f9eeca106725 | 111 | JPEG_TypeDef *Instance; /*!< JPEG peripheral register base address */ |
Kojto | 122:f9eeca106725 | 112 | |
Kojto | 122:f9eeca106725 | 113 | JPEG_ConfTypeDef Conf; /*!< Current JPEG encoding/decoding parameters */ |
Kojto | 122:f9eeca106725 | 114 | |
Kojto | 122:f9eeca106725 | 115 | uint8_t *pJpegInBuffPtr; /*!< Pointer to JPEG processing (encoding, decoding,...) input buffer */ |
Kojto | 122:f9eeca106725 | 116 | |
Kojto | 122:f9eeca106725 | 117 | uint8_t *pJpegOutBuffPtr; /*!< Pointer to JPEG processing (encoding, decoding,...) output buffer */ |
Kojto | 122:f9eeca106725 | 118 | |
Kojto | 122:f9eeca106725 | 119 | __IO uint32_t JpegInCount; /*!< Internal Counter of input data */ |
Kojto | 122:f9eeca106725 | 120 | |
Kojto | 122:f9eeca106725 | 121 | __IO uint32_t JpegOutCount; /*!< Internal Counter of output data */ |
Kojto | 122:f9eeca106725 | 122 | |
Kojto | 122:f9eeca106725 | 123 | uint32_t InDataLength; /*!< Input Buffer Length in Bytes */ |
Kojto | 122:f9eeca106725 | 124 | |
Kojto | 122:f9eeca106725 | 125 | uint32_t OutDataLength; /*!< Output Buffer Length in Bytes */ |
Kojto | 122:f9eeca106725 | 126 | |
Kojto | 122:f9eeca106725 | 127 | DMA_HandleTypeDef *hdmain; /*!< JPEG In DMA handle parameters */ |
Kojto | 122:f9eeca106725 | 128 | |
Kojto | 122:f9eeca106725 | 129 | DMA_HandleTypeDef *hdmaout; /*!< JPEG Out DMA handle parameters */ |
Kojto | 122:f9eeca106725 | 130 | |
Kojto | 122:f9eeca106725 | 131 | uint8_t CustomQuanTable; /*!< If set to 1 specify that user customized quantization tables are used */ |
Kojto | 122:f9eeca106725 | 132 | |
Kojto | 122:f9eeca106725 | 133 | uint8_t *QuantTable0; /*!< Basic Quantization Table for component 0 */ |
Kojto | 122:f9eeca106725 | 134 | |
Kojto | 122:f9eeca106725 | 135 | uint8_t *QuantTable1; /*!< Basic Quantization Table for component 1 */ |
Kojto | 122:f9eeca106725 | 136 | |
Kojto | 122:f9eeca106725 | 137 | uint8_t *QuantTable2; /*!< Basic Quantization Table for component 2 */ |
Kojto | 122:f9eeca106725 | 138 | |
Kojto | 122:f9eeca106725 | 139 | uint8_t *QuantTable3; /*!< Basic Quantization Table for component 3 */ |
Kojto | 122:f9eeca106725 | 140 | |
Kojto | 122:f9eeca106725 | 141 | HAL_LockTypeDef Lock; /*!< JPEG locking object */ |
Kojto | 122:f9eeca106725 | 142 | |
Kojto | 122:f9eeca106725 | 143 | __IO HAL_JPEG_STATETypeDef State; /*!< JPEG peripheral state */ |
Kojto | 122:f9eeca106725 | 144 | |
Kojto | 122:f9eeca106725 | 145 | __IO uint32_t ErrorCode; /*!< JPEG Error code */ |
Kojto | 122:f9eeca106725 | 146 | |
Kojto | 122:f9eeca106725 | 147 | __IO uint32_t Context; /*!< JPEG Internal context */ |
Kojto | 122:f9eeca106725 | 148 | |
Kojto | 122:f9eeca106725 | 149 | }JPEG_HandleTypeDef; |
Kojto | 122:f9eeca106725 | 150 | |
Kojto | 122:f9eeca106725 | 151 | /** |
Kojto | 122:f9eeca106725 | 152 | * @} |
Kojto | 122:f9eeca106725 | 153 | */ |
Kojto | 122:f9eeca106725 | 154 | |
Kojto | 122:f9eeca106725 | 155 | /** |
Kojto | 122:f9eeca106725 | 156 | * @} |
Kojto | 122:f9eeca106725 | 157 | */ |
Kojto | 122:f9eeca106725 | 158 | |
Kojto | 122:f9eeca106725 | 159 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 160 | |
Kojto | 122:f9eeca106725 | 161 | /** @defgroup JPEG_Exported_Constants JPEG Exported Constants |
Kojto | 122:f9eeca106725 | 162 | * @{ |
Kojto | 122:f9eeca106725 | 163 | */ |
Kojto | 122:f9eeca106725 | 164 | |
Kojto | 122:f9eeca106725 | 165 | /** @defgroup JPEG_Error_Code_definition JPEG Error Code definition |
Kojto | 122:f9eeca106725 | 166 | * @brief JPEG Error Code definition |
Kojto | 122:f9eeca106725 | 167 | * @{ |
Kojto | 122:f9eeca106725 | 168 | */ |
Kojto | 122:f9eeca106725 | 169 | |
Kojto | 122:f9eeca106725 | 170 | #define HAL_JPEG_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */ |
Kojto | 122:f9eeca106725 | 171 | #define HAL_JPEG_ERROR_HUFF_TABLE ((uint32_t)0x00000001U) /*!< HUffman Table programming error */ |
Kojto | 122:f9eeca106725 | 172 | #define HAL_JPEG_ERROR_QUANT_TABLE ((uint32_t)0x00000002U) /*!< Quantization Table programming error */ |
Kojto | 122:f9eeca106725 | 173 | #define HAL_JPEG_ERROR_DMA ((uint32_t)0x00000004U) /*!< DMA transfer error */ |
Kojto | 122:f9eeca106725 | 174 | #define HAL_JPEG_ERROR_TIMEOUT ((uint32_t)0x00000008U) /*!< Timeout error */ |
Kojto | 122:f9eeca106725 | 175 | |
Kojto | 122:f9eeca106725 | 176 | /** |
Kojto | 122:f9eeca106725 | 177 | * @} |
Kojto | 122:f9eeca106725 | 178 | */ |
Kojto | 122:f9eeca106725 | 179 | |
Kojto | 122:f9eeca106725 | 180 | /** @defgroup JPEG_Quantization_Table_Size JPEG Quantization Table Size |
Kojto | 122:f9eeca106725 | 181 | * @brief JPEG Quantization Table Size |
Kojto | 122:f9eeca106725 | 182 | * @{ |
Kojto | 122:f9eeca106725 | 183 | */ |
Kojto | 122:f9eeca106725 | 184 | #define JPEG_QUANT_TABLE_SIZE ((uint32_t)64U) |
Kojto | 122:f9eeca106725 | 185 | /** |
Kojto | 122:f9eeca106725 | 186 | * @} |
Kojto | 122:f9eeca106725 | 187 | */ |
Kojto | 122:f9eeca106725 | 188 | |
Kojto | 122:f9eeca106725 | 189 | |
Kojto | 122:f9eeca106725 | 190 | /** @defgroup JPEG_ColorSpace_Type JPEG ColorSpace |
Kojto | 122:f9eeca106725 | 191 | * @brief JPEG Color Space |
Kojto | 122:f9eeca106725 | 192 | * @{ |
Kojto | 122:f9eeca106725 | 193 | */ |
Kojto | 122:f9eeca106725 | 194 | #define JPEG_GRAYSCALE_COLORSPACE ((uint32_t)0x00000000U) |
Kojto | 122:f9eeca106725 | 195 | #define JPEG_YCBCR_COLORSPACE JPEG_CONFR1_COLORSPACE_0 |
Kojto | 122:f9eeca106725 | 196 | #define JPEG_CMYK_COLORSPACE JPEG_CONFR1_COLORSPACE |
Kojto | 122:f9eeca106725 | 197 | |
Kojto | 122:f9eeca106725 | 198 | |
Kojto | 122:f9eeca106725 | 199 | /** |
Kojto | 122:f9eeca106725 | 200 | * @} |
Kojto | 122:f9eeca106725 | 201 | */ |
Kojto | 122:f9eeca106725 | 202 | |
Kojto | 122:f9eeca106725 | 203 | |
Kojto | 122:f9eeca106725 | 204 | /** @defgroup JPEG_ChromaSubsampling_Type JPEG Chrominance Sampling |
Kojto | 122:f9eeca106725 | 205 | * @brief JPEG Chrominance Sampling |
Kojto | 122:f9eeca106725 | 206 | * @{ |
Kojto | 122:f9eeca106725 | 207 | */ |
Kojto | 122:f9eeca106725 | 208 | #define JPEG_444_SUBSAMPLING ((uint32_t)0x00000000U) /*!< Chroma Subsampling 4:4:4 */ |
Kojto | 122:f9eeca106725 | 209 | #define JPEG_420_SUBSAMPLING ((uint32_t)0x00000001U) /*!< Chroma Subsampling 4:2:0 */ |
Kojto | 122:f9eeca106725 | 210 | #define JPEG_422_SUBSAMPLING ((uint32_t)0x00000002U) /*!< Chroma Subsampling 4:2:2 */ |
Kojto | 122:f9eeca106725 | 211 | |
Kojto | 122:f9eeca106725 | 212 | /** |
Kojto | 122:f9eeca106725 | 213 | * @} |
Kojto | 122:f9eeca106725 | 214 | */ |
Kojto | 122:f9eeca106725 | 215 | |
Kojto | 122:f9eeca106725 | 216 | /** @defgroup JPEG_ImageQuality JPEG Image Quality |
Kojto | 122:f9eeca106725 | 217 | * @brief JPEG Min and Max Image Quality |
Kojto | 122:f9eeca106725 | 218 | * @{ |
Kojto | 122:f9eeca106725 | 219 | */ |
Kojto | 122:f9eeca106725 | 220 | #define JPEG_IMAGE_QUALITY_MIN ((uint32_t)1U) /*!< Minimum JPEG quality */ |
Kojto | 122:f9eeca106725 | 221 | #define JPEG_IMAGE_QUALITY_MAX ((uint32_t)100U) /*!< Maximum JPEG quality */ |
Kojto | 122:f9eeca106725 | 222 | |
Kojto | 122:f9eeca106725 | 223 | /** |
Kojto | 122:f9eeca106725 | 224 | * @} |
Kojto | 122:f9eeca106725 | 225 | */ |
Kojto | 122:f9eeca106725 | 226 | |
Kojto | 122:f9eeca106725 | 227 | /** @defgroup JPEG_Interrupt_configuration_definition JPEG Interrupt configuration definition |
Kojto | 122:f9eeca106725 | 228 | * @brief JPEG Interrupt definition |
Kojto | 122:f9eeca106725 | 229 | * @{ |
Kojto | 122:f9eeca106725 | 230 | */ |
Kojto | 122:f9eeca106725 | 231 | #define JPEG_IT_IFT ((uint32_t)JPEG_CR_IFTIE) /*!< Input FIFO Threshold Interrupt */ |
Kojto | 122:f9eeca106725 | 232 | #define JPEG_IT_IFNF ((uint32_t)JPEG_CR_IFNFIE) /*!< Input FIFO Not Full Interrupt */ |
Kojto | 122:f9eeca106725 | 233 | #define JPEG_IT_OFT ((uint32_t)JPEG_CR_OFTIE) /*!< Output FIFO Threshold Interrupt */ |
Kojto | 122:f9eeca106725 | 234 | #define JPEG_IT_OFNE ((uint32_t)JPEG_CR_OFTIE) /*!< Output FIFO Not Empty Interrupt */ |
Kojto | 122:f9eeca106725 | 235 | #define JPEG_IT_EOC ((uint32_t)JPEG_CR_EOCIE) /*!< End of Conversion Interrupt */ |
Kojto | 122:f9eeca106725 | 236 | #define JPEG_IT_HPD ((uint32_t)JPEG_CR_HPDIE) /*!< Header Parsing Done Interrupt */ |
Kojto | 122:f9eeca106725 | 237 | /** |
Kojto | 122:f9eeca106725 | 238 | * @} |
Kojto | 122:f9eeca106725 | 239 | */ |
Kojto | 122:f9eeca106725 | 240 | |
Kojto | 122:f9eeca106725 | 241 | /** @defgroup JPEG_Flag_definition JPEG Flag definition |
Kojto | 122:f9eeca106725 | 242 | * @brief JPEG Flags definition |
Kojto | 122:f9eeca106725 | 243 | * @{ |
Kojto | 122:f9eeca106725 | 244 | */ |
Kojto | 122:f9eeca106725 | 245 | #define JPEG_FLAG_IFTF ((uint32_t)JPEG_SR_IFTF) /*!< Input FIFO is not full and is bellow its threshold flag */ |
Kojto | 122:f9eeca106725 | 246 | #define JPEG_FLAG_IFNFF ((uint32_t)JPEG_SR_IFNFF) /*!< Input FIFO Not Full Flag, a data can be written */ |
Kojto | 122:f9eeca106725 | 247 | #define JPEG_FLAG_OFTF ((uint32_t)JPEG_SR_OFTF) /*!< Output FIFO is not empty and has reach its threshold */ |
Kojto | 122:f9eeca106725 | 248 | #define JPEG_FLAG_OFNEF ((uint32_t)JPEG_SR_OFNEF) /*!< Output FIFO is not empty, a data is available */ |
Kojto | 122:f9eeca106725 | 249 | #define JPEG_FLAG_EOCF ((uint32_t)JPEG_SR_EOCF) /*!< JPEG Codec core has finished the encoding or the decoding process and than last data has been sent to the output FIFO */ |
Kojto | 122:f9eeca106725 | 250 | #define JPEG_FLAG_HPDF ((uint32_t)JPEG_SR_HPDF) /*!< JPEG Codec has finished the parsing of the headers and the internal registers have been updated */ |
Kojto | 122:f9eeca106725 | 251 | #define JPEG_FLAG_COF ((uint32_t)JPEG_SR_COF) /*!< JPEG Codec operation on going flag*/ |
Kojto | 122:f9eeca106725 | 252 | |
Kojto | 122:f9eeca106725 | 253 | #define JPEG_FLAG_ALL ((uint32_t)0x000000FEU) /*!< JPEG Codec All previous flag*/ |
Kojto | 122:f9eeca106725 | 254 | /** |
Kojto | 122:f9eeca106725 | 255 | * @} |
Kojto | 122:f9eeca106725 | 256 | */ |
Kojto | 122:f9eeca106725 | 257 | |
Kojto | 122:f9eeca106725 | 258 | /** @defgroup JPEG_PROCESS_PAUSE_RESUME_definition JPEG Process Pause Resume definition |
Kojto | 122:f9eeca106725 | 259 | * @brief JPEG process pause, resume definition |
Kojto | 122:f9eeca106725 | 260 | * @{ |
Kojto | 122:f9eeca106725 | 261 | */ |
Kojto | 122:f9eeca106725 | 262 | #define JPEG_PAUSE_RESUME_INPUT ((uint32_t)0x00000001U) /*!< Pause/Resume Input FIFO Xfer*/ |
Kojto | 122:f9eeca106725 | 263 | #define JPEG_PAUSE_RESUME_OUTPUT ((uint32_t)0x00000002U) /*!< Pause/Resume Output FIFO Xfer*/ |
Kojto | 122:f9eeca106725 | 264 | #define JPEG_PAUSE_RESUME_INPUT_OUTPUT ((uint32_t)0x00000003U) /*!< Pause/Resume Input and Output FIFO Xfer*/ |
Kojto | 122:f9eeca106725 | 265 | /** |
Kojto | 122:f9eeca106725 | 266 | * @} |
Kojto | 122:f9eeca106725 | 267 | */ |
Kojto | 122:f9eeca106725 | 268 | |
Kojto | 122:f9eeca106725 | 269 | /** |
Kojto | 122:f9eeca106725 | 270 | * @} |
Kojto | 122:f9eeca106725 | 271 | */ |
Kojto | 122:f9eeca106725 | 272 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 273 | |
Kojto | 122:f9eeca106725 | 274 | /** @defgroup JPEG_Exported_Macros JPEG Exported Macros |
Kojto | 122:f9eeca106725 | 275 | * @{ |
Kojto | 122:f9eeca106725 | 276 | */ |
Kojto | 122:f9eeca106725 | 277 | |
Kojto | 122:f9eeca106725 | 278 | /** @brief Reset JPEG handle state |
Kojto | 122:f9eeca106725 | 279 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 280 | * @retval None |
Kojto | 122:f9eeca106725 | 281 | */ |
Kojto | 122:f9eeca106725 | 282 | #define __HAL_JPEG_RESET_HANDLE_STATE(__HANDLE__) ( (__HANDLE__)->State = HAL_JPEG_STATE_RESET) |
Kojto | 122:f9eeca106725 | 283 | |
Kojto | 122:f9eeca106725 | 284 | |
Kojto | 122:f9eeca106725 | 285 | /** |
Kojto | 122:f9eeca106725 | 286 | * @brief Enable the JPEG peripheral. |
Kojto | 122:f9eeca106725 | 287 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 288 | * @retval None |
Kojto | 122:f9eeca106725 | 289 | */ |
Kojto | 122:f9eeca106725 | 290 | #define __HAL_JPEG_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= JPEG_CR_JCEN) |
Kojto | 122:f9eeca106725 | 291 | |
Kojto | 122:f9eeca106725 | 292 | /** |
Kojto | 122:f9eeca106725 | 293 | * @brief Disable the JPEG peripheral. |
Kojto | 122:f9eeca106725 | 294 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 295 | * @retval None |
Kojto | 122:f9eeca106725 | 296 | */ |
Kojto | 122:f9eeca106725 | 297 | #define __HAL_JPEG_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~JPEG_CR_JCEN) |
Kojto | 122:f9eeca106725 | 298 | |
Kojto | 122:f9eeca106725 | 299 | |
Kojto | 122:f9eeca106725 | 300 | /** |
Kojto | 122:f9eeca106725 | 301 | * @brief Check the specified JPEG status flag. |
Kojto | 122:f9eeca106725 | 302 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 303 | * @param __FLAG__ : specifies the flag to check |
Kojto | 122:f9eeca106725 | 304 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 305 | * @arg JPEG_FLAG_IFTF : The input FIFO is not full and is bellow its threshold flag |
Kojto | 122:f9eeca106725 | 306 | * @arg JPEG_FLAG_IFNFF : The input FIFO Not Full Flag, a data can be written |
Kojto | 122:f9eeca106725 | 307 | * @arg JPEG_FLAG_OFTF : The output FIFO is not empty and has reach its threshold |
Kojto | 122:f9eeca106725 | 308 | * @arg JPEG_FLAG_OFNEF : The output FIFO is not empty, a data is available |
Kojto | 122:f9eeca106725 | 309 | * @arg JPEG_FLAG_EOCF : JPEG Codec core has finished the encoding or the decoding process |
Kojto | 122:f9eeca106725 | 310 | * and than last data has been sent to the output FIFO |
Kojto | 122:f9eeca106725 | 311 | * @arg JPEG_FLAG_HPDF : JPEG Codec has finished the parsing of the headers |
Kojto | 122:f9eeca106725 | 312 | * and the internal registers have been updated |
Kojto | 122:f9eeca106725 | 313 | * @arg JPEG_FLAG_COF : JPEG Codec operation on going flag |
Kojto | 122:f9eeca106725 | 314 | * |
Kojto | 122:f9eeca106725 | 315 | * @retval : __HAL_JPEG_GET_FLAG : returns The new state of __FLAG__ (TRUE or FALSE) |
Kojto | 122:f9eeca106725 | 316 | */ |
Kojto | 122:f9eeca106725 | 317 | |
Kojto | 122:f9eeca106725 | 318 | #define __HAL_JPEG_GET_FLAG(__HANDLE__,__FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__))) |
Kojto | 122:f9eeca106725 | 319 | |
Kojto | 122:f9eeca106725 | 320 | /** |
Kojto | 122:f9eeca106725 | 321 | * @brief Clear the specified JPEG status flag. |
Kojto | 122:f9eeca106725 | 322 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 323 | * @param __FLAG__ : specifies the flag to clear |
Kojto | 122:f9eeca106725 | 324 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 325 | * @arg JPEG_FLAG_EOCF : JPEG Codec core has finished the encoding or the decoding process |
Kojto | 122:f9eeca106725 | 326 | * and than last data has been sent to the output FIFO |
Kojto | 122:f9eeca106725 | 327 | * @arg JPEG_FLAG_HPDF : JPEG Codec has finished the parsing of the headers |
Kojto | 122:f9eeca106725 | 328 | * @retval : None |
Kojto | 122:f9eeca106725 | 329 | */ |
Kojto | 122:f9eeca106725 | 330 | |
Kojto | 122:f9eeca106725 | 331 | #define __HAL_JPEG_CLEAR_FLAG(__HANDLE__,__FLAG__) (((__HANDLE__)->Instance->CFR |= ((__FLAG__) & (JPEG_FLAG_EOCF | JPEG_FLAG_HPDF)))) |
Kojto | 122:f9eeca106725 | 332 | |
Kojto | 122:f9eeca106725 | 333 | |
Kojto | 122:f9eeca106725 | 334 | /** |
Kojto | 122:f9eeca106725 | 335 | * @brief Enable Interrupt. |
Kojto | 122:f9eeca106725 | 336 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 337 | * @param __INTERRUPT__ : specifies the interrupt to enable |
Kojto | 122:f9eeca106725 | 338 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 339 | * @arg JPEG_IT_IFT : Input FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 340 | * @arg JPEG_IT_IFNF : Input FIFO Not Full Interrupt |
Kojto | 122:f9eeca106725 | 341 | * @arg JPEG_IT_OFT : Output FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 342 | * @arg JPEG_IT_OFNE : Output FIFO Not empty Interrupt |
Kojto | 122:f9eeca106725 | 343 | * @arg JPEG_IT_EOC : End of Conversion Interrupt |
Kojto | 122:f9eeca106725 | 344 | * @arg JPEG_IT_HPD : Header Parsing Done Interrupt |
Kojto | 122:f9eeca106725 | 345 | * |
Kojto | 122:f9eeca106725 | 346 | * @retval : No retrun |
Kojto | 122:f9eeca106725 | 347 | */ |
Kojto | 122:f9eeca106725 | 348 | #define __HAL_JPEG_ENABLE_IT(__HANDLE__,__INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__) ) |
Kojto | 122:f9eeca106725 | 349 | |
Kojto | 122:f9eeca106725 | 350 | /** |
Kojto | 122:f9eeca106725 | 351 | * @brief Disable Interrupt. |
Kojto | 122:f9eeca106725 | 352 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 353 | * @param __INTERRUPT__ : specifies the interrupt to disable |
Kojto | 122:f9eeca106725 | 354 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 355 | * @arg JPEG_IT_IFT : Input FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 356 | * @arg JPEG_IT_IFNF : Input FIFO Not Full Interrupt |
Kojto | 122:f9eeca106725 | 357 | * @arg JPEG_IT_OFT : Output FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 358 | * @arg JPEG_IT_OFNE : Output FIFO Not empty Interrupt |
Kojto | 122:f9eeca106725 | 359 | * @arg JPEG_IT_EOC : End of Conversion Interrupt |
Kojto | 122:f9eeca106725 | 360 | * @arg JPEG_IT_HPD : Header Parsing Done Interrupt |
Kojto | 122:f9eeca106725 | 361 | * |
Kojto | 122:f9eeca106725 | 362 | * @note : To disable an IT we must use MODIFY_REG macro to avoid writing "1" to the FIFO flush bits |
Kojto | 122:f9eeca106725 | 363 | * located in the same IT enable register (CR register). |
Kojto | 122:f9eeca106725 | 364 | * @retval : No retrun |
Kojto | 122:f9eeca106725 | 365 | */ |
Kojto | 122:f9eeca106725 | 366 | #define __HAL_JPEG_DISABLE_IT(__HANDLE__,__INTERRUPT__) MODIFY_REG((__HANDLE__)->Instance->CR, (__INTERRUPT__), 0) |
Kojto | 122:f9eeca106725 | 367 | |
Kojto | 122:f9eeca106725 | 368 | |
Kojto | 122:f9eeca106725 | 369 | /** |
Kojto | 122:f9eeca106725 | 370 | * @brief Get Interrupt state. |
Kojto | 122:f9eeca106725 | 371 | * @param __HANDLE__: specifies the JPEG handle. |
Kojto | 122:f9eeca106725 | 372 | * @param __INTERRUPT__ : specifies the interrupt to check |
Kojto | 122:f9eeca106725 | 373 | * This parameter can be one of the following values: |
Kojto | 122:f9eeca106725 | 374 | * @arg JPEG_IT_IFT : Input FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 375 | * @arg JPEG_IT_IFNF : Input FIFO Not Full Interrupt |
Kojto | 122:f9eeca106725 | 376 | * @arg JPEG_IT_OFT : Output FIFO Threshold Interrupt |
Kojto | 122:f9eeca106725 | 377 | * @arg JPEG_IT_OFNE : Output FIFO Not empty Interrupt |
Kojto | 122:f9eeca106725 | 378 | * @arg JPEG_IT_EOC : End of Conversion Interrupt |
Kojto | 122:f9eeca106725 | 379 | * @arg JPEG_IT_HPD : Header Parsing Done Interrupt |
Kojto | 122:f9eeca106725 | 380 | * |
Kojto | 122:f9eeca106725 | 381 | * @retval : returns The new state of __INTERRUPT__ (Enabled or disabled) |
Kojto | 122:f9eeca106725 | 382 | */ |
Kojto | 122:f9eeca106725 | 383 | #define __HAL_JPEG_GET_IT_SOURCE(__HANDLE__,__INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__)) |
Kojto | 122:f9eeca106725 | 384 | |
Kojto | 122:f9eeca106725 | 385 | /** |
Kojto | 122:f9eeca106725 | 386 | * @} |
Kojto | 122:f9eeca106725 | 387 | */ |
Kojto | 122:f9eeca106725 | 388 | |
Kojto | 122:f9eeca106725 | 389 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 390 | /** @addtogroup JPEG_Exported_Functions |
Kojto | 122:f9eeca106725 | 391 | * @{ |
Kojto | 122:f9eeca106725 | 392 | */ |
Kojto | 122:f9eeca106725 | 393 | |
Kojto | 122:f9eeca106725 | 394 | /** @addtogroup JPEG_Exported_Functions_Group1 |
Kojto | 122:f9eeca106725 | 395 | * @{ |
Kojto | 122:f9eeca106725 | 396 | */ |
Kojto | 122:f9eeca106725 | 397 | /* Initialization/de-initialization functions ********************************/ |
Kojto | 122:f9eeca106725 | 398 | HAL_StatusTypeDef HAL_JPEG_Init(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 399 | HAL_StatusTypeDef HAL_JPEG_DeInit(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 400 | void HAL_JPEG_MspInit(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 401 | void HAL_JPEG_MspDeInit(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 402 | |
Kojto | 122:f9eeca106725 | 403 | /** |
Kojto | 122:f9eeca106725 | 404 | * @} |
Kojto | 122:f9eeca106725 | 405 | */ |
Kojto | 122:f9eeca106725 | 406 | |
Kojto | 122:f9eeca106725 | 407 | /** @addtogroup JPEG_Exported_Functions_Group2 |
Kojto | 122:f9eeca106725 | 408 | * @{ |
Kojto | 122:f9eeca106725 | 409 | */ |
Kojto | 122:f9eeca106725 | 410 | /* Encoding/Decoding Configuration functions ********************************/ |
Kojto | 122:f9eeca106725 | 411 | HAL_StatusTypeDef HAL_JPEG_ConfigEncoding(JPEG_HandleTypeDef *hjpeg, JPEG_ConfTypeDef *pConf); |
Kojto | 122:f9eeca106725 | 412 | HAL_StatusTypeDef HAL_JPEG_GetInfo(JPEG_HandleTypeDef *hjpeg, JPEG_ConfTypeDef *pInfo); |
Kojto | 122:f9eeca106725 | 413 | HAL_StatusTypeDef HAL_JPEG_EnableHeaderParsing(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 414 | HAL_StatusTypeDef HAL_JPEG_DisableHeaderParsing(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 415 | HAL_StatusTypeDef HAL_JPEG_SetUserQuantTables(JPEG_HandleTypeDef *hjpeg, uint8_t *QTable0, uint8_t *QTable1, uint8_t *QTable2, uint8_t *QTable3); |
Kojto | 122:f9eeca106725 | 416 | |
Kojto | 122:f9eeca106725 | 417 | /** |
Kojto | 122:f9eeca106725 | 418 | * @} |
Kojto | 122:f9eeca106725 | 419 | */ |
Kojto | 122:f9eeca106725 | 420 | |
Kojto | 122:f9eeca106725 | 421 | /** @addtogroup JPEG_Exported_Functions_Group3 |
Kojto | 122:f9eeca106725 | 422 | * @{ |
Kojto | 122:f9eeca106725 | 423 | */ |
Kojto | 122:f9eeca106725 | 424 | /* JPEG processing functions **************************************/ |
Kojto | 122:f9eeca106725 | 425 | HAL_StatusTypeDef HAL_JPEG_Encode(JPEG_HandleTypeDef *hjpeg, uint8_t *pDataInMCU, uint32_t InDataLength, uint8_t *pDataOut, uint32_t OutDataLength, uint32_t Timeout); |
Kojto | 122:f9eeca106725 | 426 | HAL_StatusTypeDef HAL_JPEG_Decode(JPEG_HandleTypeDef *hjpeg ,uint8_t *pDataIn ,uint32_t InDataLength ,uint8_t *pDataOutMCU ,uint32_t OutDataLength, uint32_t Timeout); |
Kojto | 122:f9eeca106725 | 427 | HAL_StatusTypeDef HAL_JPEG_Encode_IT(JPEG_HandleTypeDef *hjpeg, uint8_t *pDataInMCU, uint32_t InDataLength, uint8_t *pDataOut, uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 428 | HAL_StatusTypeDef HAL_JPEG_Decode_IT(JPEG_HandleTypeDef *hjpeg ,uint8_t *pDataIn ,uint32_t InDataLength ,uint8_t *pDataOutMCU ,uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 429 | HAL_StatusTypeDef HAL_JPEG_Encode_DMA(JPEG_HandleTypeDef *hjpeg, uint8_t *pDataInMCU, uint32_t InDataLength, uint8_t *pDataOut, uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 430 | HAL_StatusTypeDef HAL_JPEG_Decode_DMA(JPEG_HandleTypeDef *hjpeg ,uint8_t *pDataIn ,uint32_t InDataLength ,uint8_t *pDataOutMCU ,uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 431 | HAL_StatusTypeDef HAL_JPEG_Pause(JPEG_HandleTypeDef *hjpeg, uint32_t XferSelection); |
Kojto | 122:f9eeca106725 | 432 | HAL_StatusTypeDef HAL_JPEG_Resume(JPEG_HandleTypeDef *hjpeg, uint32_t XferSelection); |
Kojto | 122:f9eeca106725 | 433 | void HAL_JPEG_ConfigInputBuffer(JPEG_HandleTypeDef *hjpeg, uint8_t *pNewInputBuffer, uint32_t InDataLength); |
Kojto | 122:f9eeca106725 | 434 | void HAL_JPEG_ConfigOutputBuffer(JPEG_HandleTypeDef *hjpeg, uint8_t *pNewOutputBuffer, uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 435 | HAL_StatusTypeDef HAL_JPEG_Abort(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 436 | |
Kojto | 122:f9eeca106725 | 437 | /** |
Kojto | 122:f9eeca106725 | 438 | * @} |
Kojto | 122:f9eeca106725 | 439 | */ |
Kojto | 122:f9eeca106725 | 440 | |
Kojto | 122:f9eeca106725 | 441 | /** @addtogroup JPEG_Exported_Functions_Group4 |
Kojto | 122:f9eeca106725 | 442 | * @{ |
Kojto | 122:f9eeca106725 | 443 | */ |
Kojto | 122:f9eeca106725 | 444 | /* JPEG Decode/Encode callback functions ********************************************************/ |
Kojto | 122:f9eeca106725 | 445 | void HAL_JPEG_InfoReadyCallback(JPEG_HandleTypeDef *hjpeg,JPEG_ConfTypeDef *pInfo); |
Kojto | 122:f9eeca106725 | 446 | void HAL_JPEG_EncodeCpltCallback(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 447 | void HAL_JPEG_DecodeCpltCallback(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 448 | void HAL_JPEG_ErrorCallback(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 449 | void HAL_JPEG_GetDataCallback(JPEG_HandleTypeDef *hjpeg, uint32_t NbDecodedData); |
Kojto | 122:f9eeca106725 | 450 | void HAL_JPEG_DataReadyCallback (JPEG_HandleTypeDef *hjpeg, uint8_t *pDataOut, uint32_t OutDataLength); |
Kojto | 122:f9eeca106725 | 451 | |
Kojto | 122:f9eeca106725 | 452 | /** |
Kojto | 122:f9eeca106725 | 453 | * @} |
Kojto | 122:f9eeca106725 | 454 | */ |
Kojto | 122:f9eeca106725 | 455 | |
Kojto | 122:f9eeca106725 | 456 | /** @addtogroup JPEG_Exported_Functions_Group5 |
Kojto | 122:f9eeca106725 | 457 | * @{ |
Kojto | 122:f9eeca106725 | 458 | */ |
Kojto | 122:f9eeca106725 | 459 | /* JPEG IRQ handler management ******************************************************/ |
Kojto | 122:f9eeca106725 | 460 | void HAL_JPEG_IRQHandler(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 461 | |
Kojto | 122:f9eeca106725 | 462 | /** |
Kojto | 122:f9eeca106725 | 463 | * @} |
Kojto | 122:f9eeca106725 | 464 | */ |
Kojto | 122:f9eeca106725 | 465 | |
Kojto | 122:f9eeca106725 | 466 | /** @addtogroup JPEG_Exported_Functions_Group6 |
Kojto | 122:f9eeca106725 | 467 | * @{ |
Kojto | 122:f9eeca106725 | 468 | */ |
Kojto | 122:f9eeca106725 | 469 | /* Peripheral State and Error functions ************************************************/ |
Kojto | 122:f9eeca106725 | 470 | HAL_JPEG_STATETypeDef HAL_JPEG_GetState(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 471 | uint32_t HAL_JPEG_GetError(JPEG_HandleTypeDef *hjpeg); |
Kojto | 122:f9eeca106725 | 472 | |
Kojto | 122:f9eeca106725 | 473 | /** |
Kojto | 122:f9eeca106725 | 474 | * @} |
Kojto | 122:f9eeca106725 | 475 | */ |
Kojto | 122:f9eeca106725 | 476 | |
Kojto | 122:f9eeca106725 | 477 | /** |
Kojto | 122:f9eeca106725 | 478 | * @} |
Kojto | 122:f9eeca106725 | 479 | */ |
Kojto | 122:f9eeca106725 | 480 | |
Kojto | 122:f9eeca106725 | 481 | /* Private types -------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 482 | /** @defgroup JPEG_Private_Types JPEG Private Types |
Kojto | 122:f9eeca106725 | 483 | * @{ |
Kojto | 122:f9eeca106725 | 484 | */ |
Kojto | 122:f9eeca106725 | 485 | |
Kojto | 122:f9eeca106725 | 486 | /** |
Kojto | 122:f9eeca106725 | 487 | * @} |
Kojto | 122:f9eeca106725 | 488 | */ |
Kojto | 122:f9eeca106725 | 489 | |
Kojto | 122:f9eeca106725 | 490 | /* Private defines -----------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 491 | /** @defgroup JPEG_Private_Defines JPEG Private Defines |
Kojto | 122:f9eeca106725 | 492 | * @{ |
Kojto | 122:f9eeca106725 | 493 | */ |
Kojto | 122:f9eeca106725 | 494 | |
Kojto | 122:f9eeca106725 | 495 | /** |
Kojto | 122:f9eeca106725 | 496 | * @} |
Kojto | 122:f9eeca106725 | 497 | */ |
Kojto | 122:f9eeca106725 | 498 | |
Kojto | 122:f9eeca106725 | 499 | /* Private variables ---------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 500 | /** @defgroup JPEG_Private_Variables JPEG Private Variables |
Kojto | 122:f9eeca106725 | 501 | * @{ |
Kojto | 122:f9eeca106725 | 502 | */ |
Kojto | 122:f9eeca106725 | 503 | |
Kojto | 122:f9eeca106725 | 504 | /** |
Kojto | 122:f9eeca106725 | 505 | * @} |
Kojto | 122:f9eeca106725 | 506 | */ |
Kojto | 122:f9eeca106725 | 507 | |
Kojto | 122:f9eeca106725 | 508 | /* Private constants ---------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 509 | /** @defgroup JPEG_Private_Constants JPEG Private Constants |
Kojto | 122:f9eeca106725 | 510 | * @{ |
Kojto | 122:f9eeca106725 | 511 | */ |
Kojto | 122:f9eeca106725 | 512 | |
Kojto | 122:f9eeca106725 | 513 | /** |
Kojto | 122:f9eeca106725 | 514 | * @} |
Kojto | 122:f9eeca106725 | 515 | */ |
Kojto | 122:f9eeca106725 | 516 | |
Kojto | 122:f9eeca106725 | 517 | /* Private macros ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 518 | /** @defgroup JPEG_Private_Macros JPEG Private Macros |
Kojto | 122:f9eeca106725 | 519 | * @{ |
Kojto | 122:f9eeca106725 | 520 | */ |
Kojto | 122:f9eeca106725 | 521 | |
Kojto | 122:f9eeca106725 | 522 | /** @defgroup JPEG_IS_Definitions JPEG Private macros to check input parameters |
Kojto | 122:f9eeca106725 | 523 | * @{ |
Kojto | 122:f9eeca106725 | 524 | */ |
Kojto | 122:f9eeca106725 | 525 | |
Kojto | 122:f9eeca106725 | 526 | #define IS_JPEG_CHROMASUBSAMPLING(SUBSAMPLING) (((SUBSAMPLING) == JPEG_444_SUBSAMPLING) || \ |
Kojto | 122:f9eeca106725 | 527 | ((SUBSAMPLING) == JPEG_420_SUBSAMPLING) || \ |
Kojto | 122:f9eeca106725 | 528 | ((SUBSAMPLING) == JPEG_422_SUBSAMPLING)) |
Kojto | 122:f9eeca106725 | 529 | |
Kojto | 122:f9eeca106725 | 530 | #define IS_JPEG_IMAGE_QUALITY(NUMBER) (((NUMBER) >= JPEG_IMAGE_QUALITY_MIN) && ((NUMBER) <= JPEG_IMAGE_QUALITY_MAX)) |
Kojto | 122:f9eeca106725 | 531 | |
Kojto | 122:f9eeca106725 | 532 | #define IS_JPEG_COLORSPACE(COLORSPACE) (((COLORSPACE) == JPEG_GRAYSCALE_COLORSPACE) || \ |
Kojto | 122:f9eeca106725 | 533 | ((COLORSPACE) == JPEG_YCBCR_COLORSPACE) || \ |
Kojto | 122:f9eeca106725 | 534 | ((COLORSPACE) == JPEG_CMYK_COLORSPACE)) |
Kojto | 122:f9eeca106725 | 535 | |
Kojto | 122:f9eeca106725 | 536 | #define IS_JPEG_PAUSE_RESUME_STATE(VALUE) (((VALUE) == JPEG_PAUSE_RESUME_INPUT) || \ |
Kojto | 122:f9eeca106725 | 537 | ((VALUE) == JPEG_PAUSE_RESUME_OUTPUT)|| \ |
Kojto | 122:f9eeca106725 | 538 | ((VALUE) == JPEG_PAUSE_RESUME_INPUT_OUTPUT)) |
Kojto | 122:f9eeca106725 | 539 | |
Kojto | 122:f9eeca106725 | 540 | /** |
Kojto | 122:f9eeca106725 | 541 | * @} |
Kojto | 122:f9eeca106725 | 542 | */ |
Kojto | 122:f9eeca106725 | 543 | |
Kojto | 122:f9eeca106725 | 544 | /** |
Kojto | 122:f9eeca106725 | 545 | * @} |
Kojto | 122:f9eeca106725 | 546 | */ |
Kojto | 122:f9eeca106725 | 547 | |
Kojto | 122:f9eeca106725 | 548 | /* Private functions prototypes ----------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 549 | /** @defgroup JPEG_Private_Functions_Prototypes JPEG Private Functions Prototypes |
Kojto | 122:f9eeca106725 | 550 | * @{ |
Kojto | 122:f9eeca106725 | 551 | */ |
Kojto | 122:f9eeca106725 | 552 | |
Kojto | 122:f9eeca106725 | 553 | /** |
Kojto | 122:f9eeca106725 | 554 | * @} |
Kojto | 122:f9eeca106725 | 555 | */ |
Kojto | 122:f9eeca106725 | 556 | |
Kojto | 122:f9eeca106725 | 557 | /* Private functions ---------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 558 | /** @defgroup JPEG_Private_Functions JPEG Private Functions |
Kojto | 122:f9eeca106725 | 559 | * @{ |
Kojto | 122:f9eeca106725 | 560 | */ |
Kojto | 122:f9eeca106725 | 561 | |
Kojto | 122:f9eeca106725 | 562 | /** |
Kojto | 122:f9eeca106725 | 563 | * @} |
Kojto | 122:f9eeca106725 | 564 | */ |
Kojto | 122:f9eeca106725 | 565 | |
Kojto | 122:f9eeca106725 | 566 | /** |
Kojto | 122:f9eeca106725 | 567 | * @} |
Kojto | 122:f9eeca106725 | 568 | */ |
Kojto | 122:f9eeca106725 | 569 | |
Kojto | 122:f9eeca106725 | 570 | /** |
Kojto | 122:f9eeca106725 | 571 | * @} |
Kojto | 122:f9eeca106725 | 572 | */ |
Kojto | 122:f9eeca106725 | 573 | |
Kojto | 122:f9eeca106725 | 574 | #endif /* STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */ |
Kojto | 122:f9eeca106725 | 575 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 576 | } |
Kojto | 122:f9eeca106725 | 577 | #endif |
Kojto | 122:f9eeca106725 | 578 | |
Kojto | 122:f9eeca106725 | 579 | #endif /* __STM32F7xx_HAL_JPEG_H */ |
Kojto | 122:f9eeca106725 | 580 | |
Kojto | 122:f9eeca106725 | 581 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |