mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F411RE/stm32f4xx_hal_dcmi.c@323:9e901b0a5aa1, 2014-09-13 (annotated)
- Committer:
- shaoziyang
- Date:
- Sat Sep 13 14:25:46 2014 +0000
- Revision:
- 323:9e901b0a5aa1
- Parent:
- 235:685d5f11838f
test with CLOCK_SETUP = 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 235:685d5f11838f | 1 | /** |
mbed_official | 235:685d5f11838f | 2 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 3 | * @file stm32f4xx_hal_dcmi.c |
mbed_official | 235:685d5f11838f | 4 | * @author MCD Application Team |
mbed_official | 235:685d5f11838f | 5 | * @version V1.1.0 |
mbed_official | 235:685d5f11838f | 6 | * @date 19-June-2014 |
mbed_official | 235:685d5f11838f | 7 | * @brief DCMI HAL module driver |
mbed_official | 235:685d5f11838f | 8 | * This file provides firmware functions to manage the following |
mbed_official | 235:685d5f11838f | 9 | * functionalities of the Digital Camera Interface (DCMI) peripheral: |
mbed_official | 235:685d5f11838f | 10 | * + Initialization and de-initialization functions |
mbed_official | 235:685d5f11838f | 11 | * + IO operation functions |
mbed_official | 235:685d5f11838f | 12 | * + Peripheral Control functions |
mbed_official | 235:685d5f11838f | 13 | * + Peripheral State and Error functions |
mbed_official | 235:685d5f11838f | 14 | * |
mbed_official | 235:685d5f11838f | 15 | @verbatim |
mbed_official | 235:685d5f11838f | 16 | ============================================================================== |
mbed_official | 235:685d5f11838f | 17 | ##### How to use this driver ##### |
mbed_official | 235:685d5f11838f | 18 | ============================================================================== |
mbed_official | 235:685d5f11838f | 19 | [..] |
mbed_official | 235:685d5f11838f | 20 | The sequence below describes how to use this driver to capture image |
mbed_official | 235:685d5f11838f | 21 | from a camera module connected to the DCMI Interface. |
mbed_official | 235:685d5f11838f | 22 | This sequence does not take into account the configuration of the |
mbed_official | 235:685d5f11838f | 23 | camera module, which should be made before to configure and enable |
mbed_official | 235:685d5f11838f | 24 | the DCMI to capture images. |
mbed_official | 235:685d5f11838f | 25 | |
mbed_official | 235:685d5f11838f | 26 | (#) Program the required configuration through following parameters: |
mbed_official | 235:685d5f11838f | 27 | horizontal and vertical polarity, pixel clock polarity, Capture Rate, |
mbed_official | 235:685d5f11838f | 28 | Synchronization Mode, code of the frame delimiter and data width |
mbed_official | 235:685d5f11838f | 29 | using HAL_DCMI_Init() function. |
mbed_official | 235:685d5f11838f | 30 | |
mbed_official | 235:685d5f11838f | 31 | (#) Configure the DMA2_Stream1 channel1 to transfer Data from DCMI DR |
mbed_official | 235:685d5f11838f | 32 | register to the destination memory buffer. |
mbed_official | 235:685d5f11838f | 33 | |
mbed_official | 235:685d5f11838f | 34 | (#) Program the required configuration through following parameters: |
mbed_official | 235:685d5f11838f | 35 | DCMI mode, destination memory Buffer address and the data length |
mbed_official | 235:685d5f11838f | 36 | and enable capture using HAL_DCMI_Start_DMA() function. |
mbed_official | 235:685d5f11838f | 37 | |
mbed_official | 235:685d5f11838f | 38 | (#) Optionally, configure and Enable the CROP feature to select a rectangular |
mbed_official | 235:685d5f11838f | 39 | window from the received image using HAL_DCMI_ConfigCrop() |
mbed_official | 235:685d5f11838f | 40 | and HAL_DCMI_EnableCROP() functions |
mbed_official | 235:685d5f11838f | 41 | |
mbed_official | 235:685d5f11838f | 42 | (#) The capture can be stopped using HAL_DCMI_Stop() function. |
mbed_official | 235:685d5f11838f | 43 | |
mbed_official | 235:685d5f11838f | 44 | (#) To control DCMI state you can use the function HAL_DCMI_GetState(). |
mbed_official | 235:685d5f11838f | 45 | |
mbed_official | 235:685d5f11838f | 46 | *** DCMI HAL driver macros list *** |
mbed_official | 235:685d5f11838f | 47 | ============================================= |
mbed_official | 235:685d5f11838f | 48 | [..] |
mbed_official | 235:685d5f11838f | 49 | Below the list of most used macros in DCMI HAL driver. |
mbed_official | 235:685d5f11838f | 50 | |
mbed_official | 235:685d5f11838f | 51 | (+) __HAL_DCMI_ENABLE: Enable the DCMI peripheral. |
mbed_official | 235:685d5f11838f | 52 | (+) __HAL_DCMI_DISABLE: Disable the DCMI peripheral. |
mbed_official | 235:685d5f11838f | 53 | (+) __HAL_DCMI_GET_FLAG: Get the DCMI pending flags. |
mbed_official | 235:685d5f11838f | 54 | (+) __HAL_DCMI_CLEAR_FLAG: Clear the DCMI pending flags. |
mbed_official | 235:685d5f11838f | 55 | (+) __HAL_DCMI_ENABLE_IT: Enable the specified DCMI interrupts. |
mbed_official | 235:685d5f11838f | 56 | (+) __HAL_DCMI_DISABLE_IT: Disable the specified DCMI interrupts. |
mbed_official | 235:685d5f11838f | 57 | (+) __HAL_DCMI_GET_IT_SOURCE: Check whether the specified DCMI interrupt has occurred or not. |
mbed_official | 235:685d5f11838f | 58 | |
mbed_official | 235:685d5f11838f | 59 | [..] |
mbed_official | 235:685d5f11838f | 60 | (@) You can refer to the DCMI HAL driver header file for more useful macros |
mbed_official | 235:685d5f11838f | 61 | |
mbed_official | 235:685d5f11838f | 62 | @endverbatim |
mbed_official | 235:685d5f11838f | 63 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 64 | * @attention |
mbed_official | 235:685d5f11838f | 65 | * |
mbed_official | 235:685d5f11838f | 66 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 235:685d5f11838f | 67 | * |
mbed_official | 235:685d5f11838f | 68 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 235:685d5f11838f | 69 | * are permitted provided that the following conditions are met: |
mbed_official | 235:685d5f11838f | 70 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 235:685d5f11838f | 71 | * this list of conditions and the following disclaimer. |
mbed_official | 235:685d5f11838f | 72 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 235:685d5f11838f | 73 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 235:685d5f11838f | 74 | * and/or other materials provided with the distribution. |
mbed_official | 235:685d5f11838f | 75 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 235:685d5f11838f | 76 | * may be used to endorse or promote products derived from this software |
mbed_official | 235:685d5f11838f | 77 | * without specific prior written permission. |
mbed_official | 235:685d5f11838f | 78 | * |
mbed_official | 235:685d5f11838f | 79 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 235:685d5f11838f | 80 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 235:685d5f11838f | 81 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 235:685d5f11838f | 82 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 235:685d5f11838f | 83 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 235:685d5f11838f | 84 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 235:685d5f11838f | 85 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 235:685d5f11838f | 86 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 235:685d5f11838f | 87 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 235:685d5f11838f | 88 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 235:685d5f11838f | 89 | * |
mbed_official | 235:685d5f11838f | 90 | ****************************************************************************** |
mbed_official | 235:685d5f11838f | 91 | */ |
mbed_official | 235:685d5f11838f | 92 | |
mbed_official | 235:685d5f11838f | 93 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 94 | #include "stm32f4xx_hal.h" |
mbed_official | 235:685d5f11838f | 95 | |
mbed_official | 235:685d5f11838f | 96 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 235:685d5f11838f | 97 | * @{ |
mbed_official | 235:685d5f11838f | 98 | */ |
mbed_official | 235:685d5f11838f | 99 | /** @defgroup DCMI |
mbed_official | 235:685d5f11838f | 100 | * @brief DCMI HAL module driver |
mbed_official | 235:685d5f11838f | 101 | * @{ |
mbed_official | 235:685d5f11838f | 102 | */ |
mbed_official | 235:685d5f11838f | 103 | |
mbed_official | 235:685d5f11838f | 104 | #ifdef HAL_DCMI_MODULE_ENABLED |
mbed_official | 235:685d5f11838f | 105 | |
mbed_official | 235:685d5f11838f | 106 | #if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) |
mbed_official | 235:685d5f11838f | 107 | /* Private typedef -----------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 108 | /* Private define ------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 109 | #define HAL_TIMEOUT_DCMI_STOP ((uint32_t)1000) /* 1s */ |
mbed_official | 235:685d5f11838f | 110 | /* Private macro -------------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 111 | /* Private variables ---------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 112 | /* Private function prototypes -----------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 113 | static void DCMI_DMAConvCplt(DMA_HandleTypeDef *hdma); |
mbed_official | 235:685d5f11838f | 114 | static void DCMI_DMAError(DMA_HandleTypeDef *hdma); |
mbed_official | 235:685d5f11838f | 115 | |
mbed_official | 235:685d5f11838f | 116 | /* Private functions ---------------------------------------------------------*/ |
mbed_official | 235:685d5f11838f | 117 | |
mbed_official | 235:685d5f11838f | 118 | /** @defgroup DCMI_Private_Functions |
mbed_official | 235:685d5f11838f | 119 | * @{ |
mbed_official | 235:685d5f11838f | 120 | */ |
mbed_official | 235:685d5f11838f | 121 | |
mbed_official | 235:685d5f11838f | 122 | /** @defgroup DCMI_Group1 Initialization and Configuration functions |
mbed_official | 235:685d5f11838f | 123 | * @brief Initialization and Configuration functions |
mbed_official | 235:685d5f11838f | 124 | * |
mbed_official | 235:685d5f11838f | 125 | @verbatim |
mbed_official | 235:685d5f11838f | 126 | =============================================================================== |
mbed_official | 235:685d5f11838f | 127 | ##### Initialization and Configuration functions ##### |
mbed_official | 235:685d5f11838f | 128 | =============================================================================== |
mbed_official | 235:685d5f11838f | 129 | [..] This section provides functions allowing to: |
mbed_official | 235:685d5f11838f | 130 | (+) Initialize and configure the DCMI |
mbed_official | 235:685d5f11838f | 131 | (+) De-initialize the DCMI |
mbed_official | 235:685d5f11838f | 132 | |
mbed_official | 235:685d5f11838f | 133 | @endverbatim |
mbed_official | 235:685d5f11838f | 134 | * @{ |
mbed_official | 235:685d5f11838f | 135 | */ |
mbed_official | 235:685d5f11838f | 136 | |
mbed_official | 235:685d5f11838f | 137 | /** |
mbed_official | 235:685d5f11838f | 138 | * @brief Initializes the DCMI according to the specified |
mbed_official | 235:685d5f11838f | 139 | * parameters in the DCMI_InitTypeDef and create the associated handle. |
mbed_official | 235:685d5f11838f | 140 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 141 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 142 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 143 | */ |
mbed_official | 235:685d5f11838f | 144 | HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 145 | { |
mbed_official | 235:685d5f11838f | 146 | /* Check the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 147 | if(hdcmi == NULL) |
mbed_official | 235:685d5f11838f | 148 | { |
mbed_official | 235:685d5f11838f | 149 | return HAL_ERROR; |
mbed_official | 235:685d5f11838f | 150 | } |
mbed_official | 235:685d5f11838f | 151 | |
mbed_official | 235:685d5f11838f | 152 | /* Check function parameters */ |
mbed_official | 235:685d5f11838f | 153 | assert_param(IS_DCMI_ALL_INSTANCE(hdcmi->Instance)); |
mbed_official | 235:685d5f11838f | 154 | assert_param(IS_DCMI_PCKPOLARITY(hdcmi->Init.PCKPolarity)); |
mbed_official | 235:685d5f11838f | 155 | assert_param(IS_DCMI_VSPOLARITY(hdcmi->Init.VSPolarity)); |
mbed_official | 235:685d5f11838f | 156 | assert_param(IS_DCMI_HSPOLARITY(hdcmi->Init.HSPolarity)); |
mbed_official | 235:685d5f11838f | 157 | assert_param(IS_DCMI_SYNCHRO(hdcmi->Init.SynchroMode)); |
mbed_official | 235:685d5f11838f | 158 | assert_param(IS_DCMI_CAPTURE_RATE(hdcmi->Init.CaptureRate)); |
mbed_official | 235:685d5f11838f | 159 | assert_param(IS_DCMI_EXTENDED_DATA(hdcmi->Init.ExtendedDataMode)); |
mbed_official | 235:685d5f11838f | 160 | assert_param(IS_DCMI_MODE_JPEG(hdcmi->Init.JPEGMode)); |
mbed_official | 235:685d5f11838f | 161 | |
mbed_official | 235:685d5f11838f | 162 | if(hdcmi->State == HAL_DCMI_STATE_RESET) |
mbed_official | 235:685d5f11838f | 163 | { |
mbed_official | 235:685d5f11838f | 164 | /* Init the low level hardware */ |
mbed_official | 235:685d5f11838f | 165 | HAL_DCMI_MspInit(hdcmi); |
mbed_official | 235:685d5f11838f | 166 | } |
mbed_official | 235:685d5f11838f | 167 | |
mbed_official | 235:685d5f11838f | 168 | /* Change the DCMI state */ |
mbed_official | 235:685d5f11838f | 169 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 170 | |
mbed_official | 235:685d5f11838f | 171 | /* Configures the HS, VS, DE and PC polarity */ |
mbed_official | 235:685d5f11838f | 172 | hdcmi->Instance->CR &= ~(DCMI_CR_PCKPOL | DCMI_CR_HSPOL | DCMI_CR_VSPOL | DCMI_CR_EDM_0 | |
mbed_official | 235:685d5f11838f | 173 | DCMI_CR_EDM_1 | DCMI_CR_FCRC_0 | DCMI_CR_FCRC_1 | DCMI_CR_JPEG | |
mbed_official | 235:685d5f11838f | 174 | DCMI_CR_ESS); |
mbed_official | 235:685d5f11838f | 175 | hdcmi->Instance->CR |= (uint32_t)(hdcmi->Init.SynchroMode | hdcmi->Init.CaptureRate | \ |
mbed_official | 235:685d5f11838f | 176 | hdcmi->Init.VSPolarity | hdcmi->Init.HSPolarity | \ |
mbed_official | 235:685d5f11838f | 177 | hdcmi->Init.PCKPolarity | hdcmi->Init.ExtendedDataMode | \ |
mbed_official | 235:685d5f11838f | 178 | hdcmi->Init.JPEGMode); |
mbed_official | 235:685d5f11838f | 179 | |
mbed_official | 235:685d5f11838f | 180 | if(hdcmi->Init.SynchroMode == DCMI_SYNCHRO_EMBEDDED) |
mbed_official | 235:685d5f11838f | 181 | { |
mbed_official | 235:685d5f11838f | 182 | DCMI->ESCR = (((uint32_t)hdcmi->Init.SyncroCode.FrameStartCode) | |
mbed_official | 235:685d5f11838f | 183 | ((uint32_t)hdcmi->Init.SyncroCode.LineStartCode << 8)| |
mbed_official | 235:685d5f11838f | 184 | ((uint32_t)hdcmi->Init.SyncroCode.LineEndCode << 16) | |
mbed_official | 235:685d5f11838f | 185 | ((uint32_t)hdcmi->Init.SyncroCode.FrameEndCode << 24)); |
mbed_official | 235:685d5f11838f | 186 | } |
mbed_official | 235:685d5f11838f | 187 | |
mbed_official | 235:685d5f11838f | 188 | /* Enable the Line interrupt */ |
mbed_official | 235:685d5f11838f | 189 | __HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_LINE); |
mbed_official | 235:685d5f11838f | 190 | |
mbed_official | 235:685d5f11838f | 191 | /* Enable the VSYNC interrupt */ |
mbed_official | 235:685d5f11838f | 192 | __HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_VSYNC); |
mbed_official | 235:685d5f11838f | 193 | |
mbed_official | 235:685d5f11838f | 194 | /* Enable the Frame capture complete interrupt */ |
mbed_official | 235:685d5f11838f | 195 | __HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_FRAME); |
mbed_official | 235:685d5f11838f | 196 | |
mbed_official | 235:685d5f11838f | 197 | /* Enable the Synchronization error interrupt */ |
mbed_official | 235:685d5f11838f | 198 | __HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_ERR); |
mbed_official | 235:685d5f11838f | 199 | |
mbed_official | 235:685d5f11838f | 200 | /* Enable the Overflow interrupt */ |
mbed_official | 235:685d5f11838f | 201 | __HAL_DCMI_ENABLE_IT(hdcmi, DCMI_IT_OVF); |
mbed_official | 235:685d5f11838f | 202 | |
mbed_official | 235:685d5f11838f | 203 | /* Enable DCMI by setting DCMIEN bit */ |
mbed_official | 235:685d5f11838f | 204 | __HAL_DCMI_ENABLE(hdcmi); |
mbed_official | 235:685d5f11838f | 205 | |
mbed_official | 235:685d5f11838f | 206 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 207 | hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE; |
mbed_official | 235:685d5f11838f | 208 | |
mbed_official | 235:685d5f11838f | 209 | /* Initialize the DCMI state*/ |
mbed_official | 235:685d5f11838f | 210 | hdcmi->State = HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 211 | |
mbed_official | 235:685d5f11838f | 212 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 213 | } |
mbed_official | 235:685d5f11838f | 214 | |
mbed_official | 235:685d5f11838f | 215 | /** |
mbed_official | 235:685d5f11838f | 216 | * @brief Deinitializes the DCMI peripheral registers to their default reset |
mbed_official | 235:685d5f11838f | 217 | * values. |
mbed_official | 235:685d5f11838f | 218 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 219 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 220 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 221 | */ |
mbed_official | 235:685d5f11838f | 222 | |
mbed_official | 235:685d5f11838f | 223 | HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 224 | { |
mbed_official | 235:685d5f11838f | 225 | /* DeInit the low level hardware */ |
mbed_official | 235:685d5f11838f | 226 | HAL_DCMI_MspDeInit(hdcmi); |
mbed_official | 235:685d5f11838f | 227 | |
mbed_official | 235:685d5f11838f | 228 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 229 | hdcmi->ErrorCode = HAL_DCMI_ERROR_NONE; |
mbed_official | 235:685d5f11838f | 230 | |
mbed_official | 235:685d5f11838f | 231 | /* Initialize the DCMI state*/ |
mbed_official | 235:685d5f11838f | 232 | hdcmi->State = HAL_DCMI_STATE_RESET; |
mbed_official | 235:685d5f11838f | 233 | |
mbed_official | 235:685d5f11838f | 234 | /* Release Lock */ |
mbed_official | 235:685d5f11838f | 235 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 236 | |
mbed_official | 235:685d5f11838f | 237 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 238 | } |
mbed_official | 235:685d5f11838f | 239 | |
mbed_official | 235:685d5f11838f | 240 | /** |
mbed_official | 235:685d5f11838f | 241 | * @brief Initializes the DCMI MSP. |
mbed_official | 235:685d5f11838f | 242 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 243 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 244 | * @retval None |
mbed_official | 235:685d5f11838f | 245 | */ |
mbed_official | 235:685d5f11838f | 246 | __weak void HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi) |
mbed_official | 235:685d5f11838f | 247 | { |
mbed_official | 235:685d5f11838f | 248 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 249 | the HAL_DCMI_MspInit could be implemented in the user file |
mbed_official | 235:685d5f11838f | 250 | */ |
mbed_official | 235:685d5f11838f | 251 | } |
mbed_official | 235:685d5f11838f | 252 | |
mbed_official | 235:685d5f11838f | 253 | /** |
mbed_official | 235:685d5f11838f | 254 | * @brief DeInitializes the DCMI MSP. |
mbed_official | 235:685d5f11838f | 255 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 256 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 257 | * @retval None |
mbed_official | 235:685d5f11838f | 258 | */ |
mbed_official | 235:685d5f11838f | 259 | __weak void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi) |
mbed_official | 235:685d5f11838f | 260 | { |
mbed_official | 235:685d5f11838f | 261 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 262 | the HAL_DCMI_MspDeInit could be implemented in the user file |
mbed_official | 235:685d5f11838f | 263 | */ |
mbed_official | 235:685d5f11838f | 264 | } |
mbed_official | 235:685d5f11838f | 265 | |
mbed_official | 235:685d5f11838f | 266 | /** |
mbed_official | 235:685d5f11838f | 267 | * @} |
mbed_official | 235:685d5f11838f | 268 | */ |
mbed_official | 235:685d5f11838f | 269 | /** @defgroup DCMI_Group2 IO operation functions |
mbed_official | 235:685d5f11838f | 270 | * @brief IO operation functions |
mbed_official | 235:685d5f11838f | 271 | * |
mbed_official | 235:685d5f11838f | 272 | @verbatim |
mbed_official | 235:685d5f11838f | 273 | =============================================================================== |
mbed_official | 235:685d5f11838f | 274 | ##### IO operation functions ##### |
mbed_official | 235:685d5f11838f | 275 | =============================================================================== |
mbed_official | 235:685d5f11838f | 276 | [..] This section provides functions allowing to: |
mbed_official | 235:685d5f11838f | 277 | (+) Configure destination address and data length and |
mbed_official | 235:685d5f11838f | 278 | Enables DCMI DMA request and enables DCMI capture |
mbed_official | 235:685d5f11838f | 279 | (+) Stop the DCMI capture. |
mbed_official | 235:685d5f11838f | 280 | (+) Handles DCMI interrupt request. |
mbed_official | 235:685d5f11838f | 281 | |
mbed_official | 235:685d5f11838f | 282 | @endverbatim |
mbed_official | 235:685d5f11838f | 283 | * @{ |
mbed_official | 235:685d5f11838f | 284 | */ |
mbed_official | 235:685d5f11838f | 285 | |
mbed_official | 235:685d5f11838f | 286 | /** |
mbed_official | 235:685d5f11838f | 287 | * @brief Enables DCMI DMA request and enables DCMI capture |
mbed_official | 235:685d5f11838f | 288 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 289 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 290 | * @param DCMI_Mode: DCMI capture mode snapshot or continuous grab. |
mbed_official | 235:685d5f11838f | 291 | * @param pData: The destination memory Buffer address (LCD Frame buffer). |
mbed_official | 235:685d5f11838f | 292 | * @param Length: The length of capture to be transferred. |
mbed_official | 235:685d5f11838f | 293 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 294 | */ |
mbed_official | 235:685d5f11838f | 295 | HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length) |
mbed_official | 235:685d5f11838f | 296 | { |
mbed_official | 235:685d5f11838f | 297 | /* Initialise the second memory address */ |
mbed_official | 235:685d5f11838f | 298 | uint32_t SecondMemAddress = 0; |
mbed_official | 235:685d5f11838f | 299 | |
mbed_official | 235:685d5f11838f | 300 | /* Check function parameters */ |
mbed_official | 235:685d5f11838f | 301 | assert_param(IS_DCMI_CAPTURE_MODE(DCMI_Mode)); |
mbed_official | 235:685d5f11838f | 302 | |
mbed_official | 235:685d5f11838f | 303 | /* Process Locked */ |
mbed_official | 235:685d5f11838f | 304 | __HAL_LOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 305 | |
mbed_official | 235:685d5f11838f | 306 | /* Lock the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 307 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 308 | |
mbed_official | 235:685d5f11838f | 309 | /* Check the parameters */ |
mbed_official | 235:685d5f11838f | 310 | assert_param(IS_DCMI_CAPTURE_MODE(DCMI_Mode)); |
mbed_official | 235:685d5f11838f | 311 | |
mbed_official | 235:685d5f11838f | 312 | /* Configure the DCMI Mode */ |
mbed_official | 235:685d5f11838f | 313 | hdcmi->Instance->CR &= ~(DCMI_CR_CM); |
mbed_official | 235:685d5f11838f | 314 | hdcmi->Instance->CR |= (uint32_t)(DCMI_Mode); |
mbed_official | 235:685d5f11838f | 315 | |
mbed_official | 235:685d5f11838f | 316 | /* Set the DMA memory0 conversion complete callback */ |
mbed_official | 235:685d5f11838f | 317 | hdcmi->DMA_Handle->XferCpltCallback = DCMI_DMAConvCplt; |
mbed_official | 235:685d5f11838f | 318 | |
mbed_official | 235:685d5f11838f | 319 | /* Set the DMA error callback */ |
mbed_official | 235:685d5f11838f | 320 | hdcmi->DMA_Handle->XferErrorCallback = DCMI_DMAError; |
mbed_official | 235:685d5f11838f | 321 | |
mbed_official | 235:685d5f11838f | 322 | if(Length <= 0xFFFF) |
mbed_official | 235:685d5f11838f | 323 | { |
mbed_official | 235:685d5f11838f | 324 | /* Enable the DMA Stream */ |
mbed_official | 235:685d5f11838f | 325 | HAL_DMA_Start_IT(hdcmi->DMA_Handle, (uint32_t)&hdcmi->Instance->DR, (uint32_t)pData, Length); |
mbed_official | 235:685d5f11838f | 326 | } |
mbed_official | 235:685d5f11838f | 327 | else /* DCMI_DOUBLE_BUFFER Mode */ |
mbed_official | 235:685d5f11838f | 328 | { |
mbed_official | 235:685d5f11838f | 329 | /* Set the DMA memory1 conversion complete callback */ |
mbed_official | 235:685d5f11838f | 330 | hdcmi->DMA_Handle->XferM1CpltCallback = DCMI_DMAConvCplt; |
mbed_official | 235:685d5f11838f | 331 | |
mbed_official | 235:685d5f11838f | 332 | /* Initialise transfer parameters */ |
mbed_official | 235:685d5f11838f | 333 | hdcmi->XferCount = 1; |
mbed_official | 235:685d5f11838f | 334 | hdcmi->XferSize = Length; |
mbed_official | 235:685d5f11838f | 335 | hdcmi->pBuffPtr = pData; |
mbed_official | 235:685d5f11838f | 336 | |
mbed_official | 235:685d5f11838f | 337 | /* Get the number of buffer */ |
mbed_official | 235:685d5f11838f | 338 | while(hdcmi->XferSize > 0xFFFF) |
mbed_official | 235:685d5f11838f | 339 | { |
mbed_official | 235:685d5f11838f | 340 | hdcmi->XferSize = (hdcmi->XferSize/2); |
mbed_official | 235:685d5f11838f | 341 | hdcmi->XferCount = hdcmi->XferCount*2; |
mbed_official | 235:685d5f11838f | 342 | } |
mbed_official | 235:685d5f11838f | 343 | |
mbed_official | 235:685d5f11838f | 344 | /* Update DCMI counter and transfer number*/ |
mbed_official | 235:685d5f11838f | 345 | hdcmi->XferCount = (hdcmi->XferCount - 2); |
mbed_official | 235:685d5f11838f | 346 | hdcmi->XferTransferNumber = hdcmi->XferCount; |
mbed_official | 235:685d5f11838f | 347 | |
mbed_official | 235:685d5f11838f | 348 | /* Update second memory address */ |
mbed_official | 235:685d5f11838f | 349 | SecondMemAddress = (uint32_t)(pData + (4*hdcmi->XferSize)); |
mbed_official | 235:685d5f11838f | 350 | |
mbed_official | 235:685d5f11838f | 351 | /* Start DMA multi buffer transfer */ |
mbed_official | 235:685d5f11838f | 352 | HAL_DMAEx_MultiBufferStart_IT(hdcmi->DMA_Handle, (uint32_t)&hdcmi->Instance->DR, (uint32_t)pData, SecondMemAddress, hdcmi->XferSize); |
mbed_official | 235:685d5f11838f | 353 | } |
mbed_official | 235:685d5f11838f | 354 | |
mbed_official | 235:685d5f11838f | 355 | /* Enable Capture */ |
mbed_official | 235:685d5f11838f | 356 | DCMI->CR |= DCMI_CR_CAPTURE; |
mbed_official | 235:685d5f11838f | 357 | |
mbed_official | 235:685d5f11838f | 358 | /* Return function status */ |
mbed_official | 235:685d5f11838f | 359 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 360 | } |
mbed_official | 235:685d5f11838f | 361 | |
mbed_official | 235:685d5f11838f | 362 | /** |
mbed_official | 235:685d5f11838f | 363 | * @brief Disable DCMI DMA request and Disable DCMI capture |
mbed_official | 235:685d5f11838f | 364 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 365 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 366 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 367 | */ |
mbed_official | 235:685d5f11838f | 368 | HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi) |
mbed_official | 235:685d5f11838f | 369 | { |
mbed_official | 235:685d5f11838f | 370 | uint32_t tickstart = 0; |
mbed_official | 235:685d5f11838f | 371 | |
mbed_official | 235:685d5f11838f | 372 | /* Lock the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 373 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 374 | |
mbed_official | 235:685d5f11838f | 375 | __HAL_DCMI_DISABLE(hdcmi); |
mbed_official | 235:685d5f11838f | 376 | |
mbed_official | 235:685d5f11838f | 377 | /* Disable Capture */ |
mbed_official | 235:685d5f11838f | 378 | DCMI->CR &= ~(DCMI_CR_CAPTURE); |
mbed_official | 235:685d5f11838f | 379 | |
mbed_official | 235:685d5f11838f | 380 | /* Get tick */ |
mbed_official | 235:685d5f11838f | 381 | tickstart = HAL_GetTick(); |
mbed_official | 235:685d5f11838f | 382 | |
mbed_official | 235:685d5f11838f | 383 | /* Check if the DCMI capture effectively disabled */ |
mbed_official | 235:685d5f11838f | 384 | while((hdcmi->Instance->CR & DCMI_CR_CAPTURE) != 0) |
mbed_official | 235:685d5f11838f | 385 | { |
mbed_official | 235:685d5f11838f | 386 | if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DCMI_STOP) |
mbed_official | 235:685d5f11838f | 387 | { |
mbed_official | 235:685d5f11838f | 388 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 389 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 390 | |
mbed_official | 235:685d5f11838f | 391 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 392 | hdcmi->ErrorCode |= HAL_DCMI_ERROR_TIMEOUT; |
mbed_official | 235:685d5f11838f | 393 | |
mbed_official | 235:685d5f11838f | 394 | /* Change DCMI state */ |
mbed_official | 235:685d5f11838f | 395 | hdcmi->State = HAL_DCMI_STATE_TIMEOUT; |
mbed_official | 235:685d5f11838f | 396 | |
mbed_official | 235:685d5f11838f | 397 | return HAL_TIMEOUT; |
mbed_official | 235:685d5f11838f | 398 | } |
mbed_official | 235:685d5f11838f | 399 | } |
mbed_official | 235:685d5f11838f | 400 | |
mbed_official | 235:685d5f11838f | 401 | /* Disable the DMA */ |
mbed_official | 235:685d5f11838f | 402 | HAL_DMA_Abort(hdcmi->DMA_Handle); |
mbed_official | 235:685d5f11838f | 403 | |
mbed_official | 235:685d5f11838f | 404 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 405 | hdcmi->ErrorCode |= HAL_DCMI_ERROR_NONE; |
mbed_official | 235:685d5f11838f | 406 | |
mbed_official | 235:685d5f11838f | 407 | /* Change DCMI state */ |
mbed_official | 235:685d5f11838f | 408 | hdcmi->State = HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 409 | |
mbed_official | 235:685d5f11838f | 410 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 411 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 412 | |
mbed_official | 235:685d5f11838f | 413 | /* Return function status */ |
mbed_official | 235:685d5f11838f | 414 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 415 | } |
mbed_official | 235:685d5f11838f | 416 | |
mbed_official | 235:685d5f11838f | 417 | /** |
mbed_official | 235:685d5f11838f | 418 | * @brief Handles DCMI interrupt request. |
mbed_official | 235:685d5f11838f | 419 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 420 | * the configuration information for the DCMI. |
mbed_official | 235:685d5f11838f | 421 | * @retval None |
mbed_official | 235:685d5f11838f | 422 | */ |
mbed_official | 235:685d5f11838f | 423 | void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 424 | { |
mbed_official | 235:685d5f11838f | 425 | /* Synchronization error interrupt management *******************************/ |
mbed_official | 235:685d5f11838f | 426 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_ERRRI) != RESET) |
mbed_official | 235:685d5f11838f | 427 | { |
mbed_official | 235:685d5f11838f | 428 | if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_ERR) != RESET) |
mbed_official | 235:685d5f11838f | 429 | { |
mbed_official | 235:685d5f11838f | 430 | /* Disable the Synchronization error interrupt */ |
mbed_official | 235:685d5f11838f | 431 | __HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_ERR); |
mbed_official | 235:685d5f11838f | 432 | |
mbed_official | 235:685d5f11838f | 433 | /* Clear the Synchronization error flag */ |
mbed_official | 235:685d5f11838f | 434 | __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_ERRRI); |
mbed_official | 235:685d5f11838f | 435 | |
mbed_official | 235:685d5f11838f | 436 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 437 | hdcmi->ErrorCode |= HAL_DCMI_ERROR_SYNC; |
mbed_official | 235:685d5f11838f | 438 | |
mbed_official | 235:685d5f11838f | 439 | /* Change DCMI state */ |
mbed_official | 235:685d5f11838f | 440 | hdcmi->State = HAL_DCMI_STATE_ERROR; |
mbed_official | 235:685d5f11838f | 441 | |
mbed_official | 235:685d5f11838f | 442 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 443 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 444 | |
mbed_official | 235:685d5f11838f | 445 | /* Abort the DMA Transfer */ |
mbed_official | 235:685d5f11838f | 446 | HAL_DMA_Abort(hdcmi->DMA_Handle); |
mbed_official | 235:685d5f11838f | 447 | |
mbed_official | 235:685d5f11838f | 448 | /* Synchronization error Callback */ |
mbed_official | 235:685d5f11838f | 449 | HAL_DCMI_ErrorCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 450 | } |
mbed_official | 235:685d5f11838f | 451 | } |
mbed_official | 235:685d5f11838f | 452 | /* Overflow interrupt management ********************************************/ |
mbed_official | 235:685d5f11838f | 453 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_OVFRI) != RESET) |
mbed_official | 235:685d5f11838f | 454 | { |
mbed_official | 235:685d5f11838f | 455 | if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_OVF) != RESET) |
mbed_official | 235:685d5f11838f | 456 | { |
mbed_official | 235:685d5f11838f | 457 | /* Disable the Overflow interrupt */ |
mbed_official | 235:685d5f11838f | 458 | __HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_OVF); |
mbed_official | 235:685d5f11838f | 459 | |
mbed_official | 235:685d5f11838f | 460 | /* Clear the Overflow flag */ |
mbed_official | 235:685d5f11838f | 461 | __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_OVFRI); |
mbed_official | 235:685d5f11838f | 462 | |
mbed_official | 235:685d5f11838f | 463 | /* Update error code */ |
mbed_official | 235:685d5f11838f | 464 | hdcmi->ErrorCode |= HAL_DCMI_ERROR_OVF; |
mbed_official | 235:685d5f11838f | 465 | |
mbed_official | 235:685d5f11838f | 466 | /* Change DCMI state */ |
mbed_official | 235:685d5f11838f | 467 | hdcmi->State = HAL_DCMI_STATE_ERROR; |
mbed_official | 235:685d5f11838f | 468 | |
mbed_official | 235:685d5f11838f | 469 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 470 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 471 | |
mbed_official | 235:685d5f11838f | 472 | /* Abort the DMA Transfer */ |
mbed_official | 235:685d5f11838f | 473 | HAL_DMA_Abort(hdcmi->DMA_Handle); |
mbed_official | 235:685d5f11838f | 474 | |
mbed_official | 235:685d5f11838f | 475 | /* Overflow Callback */ |
mbed_official | 235:685d5f11838f | 476 | HAL_DCMI_ErrorCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 477 | } |
mbed_official | 235:685d5f11838f | 478 | } |
mbed_official | 235:685d5f11838f | 479 | /* Line Interrupt management ************************************************/ |
mbed_official | 235:685d5f11838f | 480 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_LINERI) != RESET) |
mbed_official | 235:685d5f11838f | 481 | { |
mbed_official | 235:685d5f11838f | 482 | if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_LINE) != RESET) |
mbed_official | 235:685d5f11838f | 483 | { |
mbed_official | 235:685d5f11838f | 484 | /* Clear the Line interrupt flag */ |
mbed_official | 235:685d5f11838f | 485 | __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_LINERI); |
mbed_official | 235:685d5f11838f | 486 | |
mbed_official | 235:685d5f11838f | 487 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 488 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 489 | |
mbed_official | 235:685d5f11838f | 490 | /* Line interrupt Callback */ |
mbed_official | 235:685d5f11838f | 491 | HAL_DCMI_LineEventCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 492 | } |
mbed_official | 235:685d5f11838f | 493 | } |
mbed_official | 235:685d5f11838f | 494 | /* VSYNC interrupt management ***********************************************/ |
mbed_official | 235:685d5f11838f | 495 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_VSYNCRI) != RESET) |
mbed_official | 235:685d5f11838f | 496 | { |
mbed_official | 235:685d5f11838f | 497 | if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_VSYNC) != RESET) |
mbed_official | 235:685d5f11838f | 498 | { |
mbed_official | 235:685d5f11838f | 499 | /* Disable the VSYNC interrupt */ |
mbed_official | 235:685d5f11838f | 500 | __HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_VSYNC); |
mbed_official | 235:685d5f11838f | 501 | |
mbed_official | 235:685d5f11838f | 502 | /* Clear the VSYNC flag */ |
mbed_official | 235:685d5f11838f | 503 | __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_VSYNCRI); |
mbed_official | 235:685d5f11838f | 504 | |
mbed_official | 235:685d5f11838f | 505 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 506 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 507 | |
mbed_official | 235:685d5f11838f | 508 | /* VSYNC Callback */ |
mbed_official | 235:685d5f11838f | 509 | HAL_DCMI_VsyncEventCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 510 | } |
mbed_official | 235:685d5f11838f | 511 | } |
mbed_official | 235:685d5f11838f | 512 | /* End of Frame interrupt management ****************************************/ |
mbed_official | 235:685d5f11838f | 513 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_FRAMERI) != RESET) |
mbed_official | 235:685d5f11838f | 514 | { |
mbed_official | 235:685d5f11838f | 515 | if(__HAL_DCMI_GET_IT_SOURCE(hdcmi, DCMI_IT_FRAME) != RESET) |
mbed_official | 235:685d5f11838f | 516 | { |
mbed_official | 235:685d5f11838f | 517 | /* Disable the End of Frame interrupt */ |
mbed_official | 235:685d5f11838f | 518 | __HAL_DCMI_DISABLE_IT(hdcmi, DCMI_IT_FRAME); |
mbed_official | 235:685d5f11838f | 519 | |
mbed_official | 235:685d5f11838f | 520 | /* Clear the End of Frame flag */ |
mbed_official | 235:685d5f11838f | 521 | __HAL_DCMI_CLEAR_FLAG(hdcmi, DCMI_FLAG_FRAMERI); |
mbed_official | 235:685d5f11838f | 522 | |
mbed_official | 235:685d5f11838f | 523 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 524 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 525 | |
mbed_official | 235:685d5f11838f | 526 | /* End of Frame Callback */ |
mbed_official | 235:685d5f11838f | 527 | HAL_DCMI_FrameEventCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 528 | } |
mbed_official | 235:685d5f11838f | 529 | } |
mbed_official | 235:685d5f11838f | 530 | } |
mbed_official | 235:685d5f11838f | 531 | |
mbed_official | 235:685d5f11838f | 532 | /** |
mbed_official | 235:685d5f11838f | 533 | * @brief Error DCMI callback. |
mbed_official | 235:685d5f11838f | 534 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 535 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 536 | * @retval None |
mbed_official | 235:685d5f11838f | 537 | */ |
mbed_official | 235:685d5f11838f | 538 | __weak void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 539 | { |
mbed_official | 235:685d5f11838f | 540 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 541 | the HAL_DCMI_ErrorCallback could be implemented in the user file |
mbed_official | 235:685d5f11838f | 542 | */ |
mbed_official | 235:685d5f11838f | 543 | } |
mbed_official | 235:685d5f11838f | 544 | |
mbed_official | 235:685d5f11838f | 545 | /** |
mbed_official | 235:685d5f11838f | 546 | * @brief Line Event callback. |
mbed_official | 235:685d5f11838f | 547 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 548 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 549 | * @retval None |
mbed_official | 235:685d5f11838f | 550 | */ |
mbed_official | 235:685d5f11838f | 551 | __weak void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 552 | { |
mbed_official | 235:685d5f11838f | 553 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 554 | the HAL_DCMI_LineEventCallback could be implemented in the user file |
mbed_official | 235:685d5f11838f | 555 | */ |
mbed_official | 235:685d5f11838f | 556 | } |
mbed_official | 235:685d5f11838f | 557 | |
mbed_official | 235:685d5f11838f | 558 | /** |
mbed_official | 235:685d5f11838f | 559 | * @brief VSYNC Event callback. |
mbed_official | 235:685d5f11838f | 560 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 561 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 562 | * @retval None |
mbed_official | 235:685d5f11838f | 563 | */ |
mbed_official | 235:685d5f11838f | 564 | __weak void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 565 | { |
mbed_official | 235:685d5f11838f | 566 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 567 | the HAL_DCMI_VsyncEventCallback could be implemented in the user file |
mbed_official | 235:685d5f11838f | 568 | */ |
mbed_official | 235:685d5f11838f | 569 | } |
mbed_official | 235:685d5f11838f | 570 | |
mbed_official | 235:685d5f11838f | 571 | /** |
mbed_official | 235:685d5f11838f | 572 | * @brief Frame Event callback. |
mbed_official | 235:685d5f11838f | 573 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 574 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 575 | * @retval None |
mbed_official | 235:685d5f11838f | 576 | */ |
mbed_official | 235:685d5f11838f | 577 | __weak void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 578 | { |
mbed_official | 235:685d5f11838f | 579 | /* NOTE : This function Should not be modified, when the callback is needed, |
mbed_official | 235:685d5f11838f | 580 | the HAL_DCMI_FrameEventCallback could be implemented in the user file |
mbed_official | 235:685d5f11838f | 581 | */ |
mbed_official | 235:685d5f11838f | 582 | } |
mbed_official | 235:685d5f11838f | 583 | |
mbed_official | 235:685d5f11838f | 584 | /** |
mbed_official | 235:685d5f11838f | 585 | * @} |
mbed_official | 235:685d5f11838f | 586 | */ |
mbed_official | 235:685d5f11838f | 587 | |
mbed_official | 235:685d5f11838f | 588 | /** @defgroup DCMI_Group3 Peripheral Control functions |
mbed_official | 235:685d5f11838f | 589 | * @brief Peripheral Control functions |
mbed_official | 235:685d5f11838f | 590 | * |
mbed_official | 235:685d5f11838f | 591 | @verbatim |
mbed_official | 235:685d5f11838f | 592 | =============================================================================== |
mbed_official | 235:685d5f11838f | 593 | ##### Peripheral Control functions ##### |
mbed_official | 235:685d5f11838f | 594 | =============================================================================== |
mbed_official | 235:685d5f11838f | 595 | [..] This section provides functions allowing to: |
mbed_official | 235:685d5f11838f | 596 | (+) Configure the CROP feature. |
mbed_official | 235:685d5f11838f | 597 | (+) Enable/Disable the CROP feature. |
mbed_official | 235:685d5f11838f | 598 | |
mbed_official | 235:685d5f11838f | 599 | @endverbatim |
mbed_official | 235:685d5f11838f | 600 | * @{ |
mbed_official | 235:685d5f11838f | 601 | */ |
mbed_official | 235:685d5f11838f | 602 | |
mbed_official | 235:685d5f11838f | 603 | /** |
mbed_official | 235:685d5f11838f | 604 | * @brief Configure the DCMI CROP coordinate. |
mbed_official | 235:685d5f11838f | 605 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 606 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 607 | * @param YSize: DCMI Line number |
mbed_official | 235:685d5f11838f | 608 | * @param XSize: DCMI Pixel per line |
mbed_official | 235:685d5f11838f | 609 | * @param X0: DCMI window X offset |
mbed_official | 235:685d5f11838f | 610 | * @param Y0: DCMI window Y offset |
mbed_official | 235:685d5f11838f | 611 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 612 | */ |
mbed_official | 235:685d5f11838f | 613 | HAL_StatusTypeDef HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize) |
mbed_official | 235:685d5f11838f | 614 | { |
mbed_official | 235:685d5f11838f | 615 | /* Process Locked */ |
mbed_official | 235:685d5f11838f | 616 | __HAL_LOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 617 | |
mbed_official | 235:685d5f11838f | 618 | /* Lock the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 619 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 620 | |
mbed_official | 235:685d5f11838f | 621 | /* Check the parameters */ |
mbed_official | 235:685d5f11838f | 622 | assert_param(IS_DCMI_WINDOW_COORDINATE(X0)); |
mbed_official | 235:685d5f11838f | 623 | assert_param(IS_DCMI_WINDOW_COORDINATE(Y0)); |
mbed_official | 235:685d5f11838f | 624 | assert_param(IS_DCMI_WINDOW_COORDINATE(XSize)); |
mbed_official | 235:685d5f11838f | 625 | assert_param(IS_DCMI_WINDOW_HEIGHT(YSize)); |
mbed_official | 235:685d5f11838f | 626 | |
mbed_official | 235:685d5f11838f | 627 | /* Configure CROP */ |
mbed_official | 235:685d5f11838f | 628 | DCMI->CWSIZER = (XSize | (YSize << 16)); |
mbed_official | 235:685d5f11838f | 629 | DCMI->CWSTRTR = (X0 | (Y0 << 16)); |
mbed_official | 235:685d5f11838f | 630 | |
mbed_official | 235:685d5f11838f | 631 | /* Initialize the DCMI state*/ |
mbed_official | 235:685d5f11838f | 632 | hdcmi->State = HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 633 | |
mbed_official | 235:685d5f11838f | 634 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 635 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 636 | |
mbed_official | 235:685d5f11838f | 637 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 638 | } |
mbed_official | 235:685d5f11838f | 639 | |
mbed_official | 235:685d5f11838f | 640 | /** |
mbed_official | 235:685d5f11838f | 641 | * @brief Disable the Crop feature. |
mbed_official | 235:685d5f11838f | 642 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 643 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 644 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 645 | */ |
mbed_official | 235:685d5f11838f | 646 | HAL_StatusTypeDef HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 647 | { |
mbed_official | 235:685d5f11838f | 648 | /* Process Locked */ |
mbed_official | 235:685d5f11838f | 649 | __HAL_LOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 650 | |
mbed_official | 235:685d5f11838f | 651 | /* Lock the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 652 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 653 | |
mbed_official | 235:685d5f11838f | 654 | /* Disable DCMI Crop feature */ |
mbed_official | 235:685d5f11838f | 655 | DCMI->CR &= ~(uint32_t)DCMI_CR_CROP; |
mbed_official | 235:685d5f11838f | 656 | |
mbed_official | 235:685d5f11838f | 657 | /* Change the DCMI state*/ |
mbed_official | 235:685d5f11838f | 658 | hdcmi->State = HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 659 | |
mbed_official | 235:685d5f11838f | 660 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 661 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 662 | |
mbed_official | 235:685d5f11838f | 663 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 664 | } |
mbed_official | 235:685d5f11838f | 665 | |
mbed_official | 235:685d5f11838f | 666 | /** |
mbed_official | 235:685d5f11838f | 667 | * @brief Enable the Crop feature. |
mbed_official | 235:685d5f11838f | 668 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 669 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 670 | * @retval HAL status |
mbed_official | 235:685d5f11838f | 671 | */ |
mbed_official | 235:685d5f11838f | 672 | HAL_StatusTypeDef HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 673 | { |
mbed_official | 235:685d5f11838f | 674 | /* Process Locked */ |
mbed_official | 235:685d5f11838f | 675 | __HAL_LOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 676 | |
mbed_official | 235:685d5f11838f | 677 | /* Lock the DCMI peripheral state */ |
mbed_official | 235:685d5f11838f | 678 | hdcmi->State = HAL_DCMI_STATE_BUSY; |
mbed_official | 235:685d5f11838f | 679 | |
mbed_official | 235:685d5f11838f | 680 | /* Enable DCMI Crop feature */ |
mbed_official | 235:685d5f11838f | 681 | DCMI->CR |= (uint32_t)DCMI_CR_CROP; |
mbed_official | 235:685d5f11838f | 682 | |
mbed_official | 235:685d5f11838f | 683 | /* Change the DCMI state*/ |
mbed_official | 235:685d5f11838f | 684 | hdcmi->State = HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 685 | |
mbed_official | 235:685d5f11838f | 686 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 687 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 688 | |
mbed_official | 235:685d5f11838f | 689 | return HAL_OK; |
mbed_official | 235:685d5f11838f | 690 | } |
mbed_official | 235:685d5f11838f | 691 | |
mbed_official | 235:685d5f11838f | 692 | /** |
mbed_official | 235:685d5f11838f | 693 | * @} |
mbed_official | 235:685d5f11838f | 694 | */ |
mbed_official | 235:685d5f11838f | 695 | |
mbed_official | 235:685d5f11838f | 696 | /** @defgroup DCMI_Group4 Peripheral State functions |
mbed_official | 235:685d5f11838f | 697 | * @brief Peripheral State functions |
mbed_official | 235:685d5f11838f | 698 | * |
mbed_official | 235:685d5f11838f | 699 | @verbatim |
mbed_official | 235:685d5f11838f | 700 | =============================================================================== |
mbed_official | 235:685d5f11838f | 701 | ##### Peripheral State and Errors functions ##### |
mbed_official | 235:685d5f11838f | 702 | =============================================================================== |
mbed_official | 235:685d5f11838f | 703 | [..] |
mbed_official | 235:685d5f11838f | 704 | This subsection provides functions allowing to |
mbed_official | 235:685d5f11838f | 705 | (+) Check the DCMI state. |
mbed_official | 235:685d5f11838f | 706 | (+) Get the specific DCMI error flag. |
mbed_official | 235:685d5f11838f | 707 | |
mbed_official | 235:685d5f11838f | 708 | @endverbatim |
mbed_official | 235:685d5f11838f | 709 | * @{ |
mbed_official | 235:685d5f11838f | 710 | */ |
mbed_official | 235:685d5f11838f | 711 | |
mbed_official | 235:685d5f11838f | 712 | /** |
mbed_official | 235:685d5f11838f | 713 | * @brief Return the DCMI state |
mbed_official | 235:685d5f11838f | 714 | * @param hdcmi: pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 715 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 716 | * @retval HAL state |
mbed_official | 235:685d5f11838f | 717 | */ |
mbed_official | 235:685d5f11838f | 718 | HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 719 | { |
mbed_official | 235:685d5f11838f | 720 | return hdcmi->State; |
mbed_official | 235:685d5f11838f | 721 | } |
mbed_official | 235:685d5f11838f | 722 | |
mbed_official | 235:685d5f11838f | 723 | /** |
mbed_official | 235:685d5f11838f | 724 | * @brief Return the DCMI error code |
mbed_official | 235:685d5f11838f | 725 | * @param hdcmi : pointer to a DCMI_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 726 | * the configuration information for DCMI. |
mbed_official | 235:685d5f11838f | 727 | * @retval DCMI Error Code |
mbed_official | 235:685d5f11838f | 728 | */ |
mbed_official | 235:685d5f11838f | 729 | uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi) |
mbed_official | 235:685d5f11838f | 730 | { |
mbed_official | 235:685d5f11838f | 731 | return hdcmi->ErrorCode; |
mbed_official | 235:685d5f11838f | 732 | } |
mbed_official | 235:685d5f11838f | 733 | |
mbed_official | 235:685d5f11838f | 734 | /** |
mbed_official | 235:685d5f11838f | 735 | * @} |
mbed_official | 235:685d5f11838f | 736 | */ |
mbed_official | 235:685d5f11838f | 737 | |
mbed_official | 235:685d5f11838f | 738 | /** |
mbed_official | 235:685d5f11838f | 739 | * @brief DMA conversion complete callback. |
mbed_official | 235:685d5f11838f | 740 | * @param hdma: pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 741 | * the configuration information for the specified DMA module. |
mbed_official | 235:685d5f11838f | 742 | * @retval None |
mbed_official | 235:685d5f11838f | 743 | */ |
mbed_official | 235:685d5f11838f | 744 | static void DCMI_DMAConvCplt(DMA_HandleTypeDef *hdma) |
mbed_official | 235:685d5f11838f | 745 | { |
mbed_official | 235:685d5f11838f | 746 | uint32_t tmp = 0; |
mbed_official | 235:685d5f11838f | 747 | |
mbed_official | 235:685d5f11838f | 748 | DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; |
mbed_official | 235:685d5f11838f | 749 | hdcmi->State= HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 750 | |
mbed_official | 235:685d5f11838f | 751 | if(hdcmi->XferCount != 0) |
mbed_official | 235:685d5f11838f | 752 | { |
mbed_official | 235:685d5f11838f | 753 | /* Update memory 0 address location */ |
mbed_official | 235:685d5f11838f | 754 | tmp = ((hdcmi->DMA_Handle->Instance->CR) & DMA_SxCR_CT); |
mbed_official | 235:685d5f11838f | 755 | if(((hdcmi->XferCount % 2) == 0) && (tmp != 0)) |
mbed_official | 235:685d5f11838f | 756 | { |
mbed_official | 235:685d5f11838f | 757 | tmp = hdcmi->DMA_Handle->Instance->M0AR; |
mbed_official | 235:685d5f11838f | 758 | HAL_DMAEx_ChangeMemory(hdcmi->DMA_Handle, (tmp + (8*hdcmi->XferSize)), MEMORY0); |
mbed_official | 235:685d5f11838f | 759 | hdcmi->XferCount--; |
mbed_official | 235:685d5f11838f | 760 | } |
mbed_official | 235:685d5f11838f | 761 | /* Update memory 1 address location */ |
mbed_official | 235:685d5f11838f | 762 | else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) == 0) |
mbed_official | 235:685d5f11838f | 763 | { |
mbed_official | 235:685d5f11838f | 764 | tmp = hdcmi->DMA_Handle->Instance->M1AR; |
mbed_official | 235:685d5f11838f | 765 | HAL_DMAEx_ChangeMemory(hdcmi->DMA_Handle, (tmp + (8*hdcmi->XferSize)), MEMORY1); |
mbed_official | 235:685d5f11838f | 766 | hdcmi->XferCount--; |
mbed_official | 235:685d5f11838f | 767 | } |
mbed_official | 235:685d5f11838f | 768 | } |
mbed_official | 235:685d5f11838f | 769 | /* Update memory 0 address location */ |
mbed_official | 235:685d5f11838f | 770 | else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) != 0) |
mbed_official | 235:685d5f11838f | 771 | { |
mbed_official | 235:685d5f11838f | 772 | hdcmi->DMA_Handle->Instance->M0AR = hdcmi->pBuffPtr; |
mbed_official | 235:685d5f11838f | 773 | } |
mbed_official | 235:685d5f11838f | 774 | /* Update memory 1 address location */ |
mbed_official | 235:685d5f11838f | 775 | else if((hdcmi->DMA_Handle->Instance->CR & DMA_SxCR_CT) == 0) |
mbed_official | 235:685d5f11838f | 776 | { |
mbed_official | 235:685d5f11838f | 777 | tmp = hdcmi->pBuffPtr; |
mbed_official | 235:685d5f11838f | 778 | hdcmi->DMA_Handle->Instance->M1AR = (tmp + (4*hdcmi->XferSize)); |
mbed_official | 235:685d5f11838f | 779 | hdcmi->XferCount = hdcmi->XferTransferNumber; |
mbed_official | 235:685d5f11838f | 780 | } |
mbed_official | 235:685d5f11838f | 781 | |
mbed_official | 235:685d5f11838f | 782 | if(__HAL_DCMI_GET_FLAG(hdcmi, DCMI_FLAG_FRAMERI) != RESET) |
mbed_official | 235:685d5f11838f | 783 | { |
mbed_official | 235:685d5f11838f | 784 | /* Process Unlocked */ |
mbed_official | 235:685d5f11838f | 785 | __HAL_UNLOCK(hdcmi); |
mbed_official | 235:685d5f11838f | 786 | |
mbed_official | 235:685d5f11838f | 787 | /* FRAME Callback */ |
mbed_official | 235:685d5f11838f | 788 | HAL_DCMI_FrameEventCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 789 | } |
mbed_official | 235:685d5f11838f | 790 | } |
mbed_official | 235:685d5f11838f | 791 | |
mbed_official | 235:685d5f11838f | 792 | /** |
mbed_official | 235:685d5f11838f | 793 | * @brief DMA error callback |
mbed_official | 235:685d5f11838f | 794 | * @param hdma: pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 235:685d5f11838f | 795 | * the configuration information for the specified DMA module. |
mbed_official | 235:685d5f11838f | 796 | * @retval None |
mbed_official | 235:685d5f11838f | 797 | */ |
mbed_official | 235:685d5f11838f | 798 | static void DCMI_DMAError(DMA_HandleTypeDef *hdma) |
mbed_official | 235:685d5f11838f | 799 | { |
mbed_official | 235:685d5f11838f | 800 | DCMI_HandleTypeDef* hdcmi = ( DCMI_HandleTypeDef* )((DMA_HandleTypeDef* )hdma)->Parent; |
mbed_official | 235:685d5f11838f | 801 | hdcmi->State= HAL_DCMI_STATE_READY; |
mbed_official | 235:685d5f11838f | 802 | HAL_DCMI_ErrorCallback(hdcmi); |
mbed_official | 235:685d5f11838f | 803 | } |
mbed_official | 235:685d5f11838f | 804 | |
mbed_official | 235:685d5f11838f | 805 | /** |
mbed_official | 235:685d5f11838f | 806 | * @} |
mbed_official | 235:685d5f11838f | 807 | */ |
mbed_official | 235:685d5f11838f | 808 | #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */ |
mbed_official | 235:685d5f11838f | 809 | #endif /* HAL_DCMI_MODULE_ENABLED */ |
mbed_official | 235:685d5f11838f | 810 | /** |
mbed_official | 235:685d5f11838f | 811 | * @} |
mbed_official | 235:685d5f11838f | 812 | */ |
mbed_official | 235:685d5f11838f | 813 | |
mbed_official | 235:685d5f11838f | 814 | /** |
mbed_official | 235:685d5f11838f | 815 | * @} |
mbed_official | 235:685d5f11838f | 816 | */ |
mbed_official | 235:685d5f11838f | 817 | |
mbed_official | 235:685d5f11838f | 818 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |