Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

UM1725

 

HAL DCMI Generic Driver

 

 

YSize: DCMI Line number

Return values

 

HAL status

14.2.18HAL_DCMI_DisableCROP

Function Name

HAL_StatusTypeDef HAL_DCMI_DisableCROP

 

(DCMI_HandleTypeDef * hdcmi)

Function Description

Disable the Crop feature.

Parameters

 

hdcmi: pointer to a DCMI_HandleTypeDef structure that

 

 

contains the configuration information for DCMI.

Return values

 

HAL status

14.2.19HAL_DCMI_EnableCROP

Function Name

HAL_StatusTypeDef HAL_DCMI_EnableCROP

 

(DCMI_HandleTypeDef * hdcmi)

Function Description

Enable the Crop feature.

Parameters

 

hdcmi: pointer to a DCMI_HandleTypeDef structure that

 

 

contains the configuration information for DCMI.

Return values

 

HAL status

14.2.20HAL_DCMI_GetState

Function Name

HAL_DCMI_StateTypeDef HAL_DCMI_GetState

 

(DCMI_HandleTypeDef * hdcmi)

Function Description

Return the DCMI state.

Parameters

 

hdcmi: pointer to a DCMI_HandleTypeDef structure that

 

 

contains the configuration information for DCMI.

Return values

 

HAL state

14.2.21HAL_DCMI_GetError

Function Name

uint32_t HAL_DCMI_GetError (DCMI_HandleTypeDef * hdcmi)

Function Description

Return the DCMI error code.

Parameters

 

hdcmi: : pointer to a DCMI_HandleTypeDef structure that

 

 

contains the configuration information for DCMI.

Return values

 

DCMI Error Code

14.3DCMI Firmware driver defines

14.3.1

DCMI

 

 

 

DCMI Capture Mode

 

 

 

DCMI_MODE_CONTINUOUS

The received data are transferred continuously into the

 

 

destination memory through the DMA

 

 

DCMI_MODE_SNAPSHOT

Once activated, the interface waits for the start of frame

 

DOCID025834 Rev 2

227/900

HAL DCMI Generic Driver

UM1725

and then transfers a single frame through the DMA

DCMI Capture Rate

 

DCMI_CR_ALL_FRAME

All frames are captured

DCMI_CR_ALTERNATE_2_FRAME

Every alternate frame captured

DCMI_CR_ALTERNATE_4_FRAME

One frame in 4 frames captured

DCMI Error Code

 

HAL_DCMI_ERROR_NONE

No error

HAL_DCMI_ERROR_OVF

Overflow error

HAL_DCMI_ERROR_SYNC

Synchronization error

HAL_DCMI_ERROR_TIMEOUT Timeout error

DCMI Exported Macros

__HAL_DCMI_RESET_HANDLE_STATE Description:

Reset DCMI handle state.

Parameters:

__HANDLE__: specifies the DCMI handle.

Return value:

 

 

None

__HAL_DCMI_ENABLE

Description:

 

 

Enable the DCMI.

 

Parameters:

 

 

__HANDLE__: DCMI handle

 

Return value:

 

 

None

__HAL_DCMI_DISABLE

Description:

 

 

Disable the DCMI.

 

Parameters:

 

 

__HANDLE__: DCMI handle

 

Return value:

 

 

None

__HAL_DCMI_GET_FLAG

Description:

 

Get the DCMI pending flags.

 

Parameters:

 

 

__HANDLE__: DCMI handle

 

__FLAG__: Get the specified flag. This

 

 

parameter can be any combination of the

 

 

following values:

 

 

DCMI_FLAG_FRAMERI: Frame

228/900

DOCID025834 Rev 2

UM1725

HAL DCMI Generic Driver

 

capture complete flag mask

 

DCMI_FLAG_OVFRI: Overflow flag

 

mask

 

DCMI_FLAG_ERRRI:

 

Synchronization error flag mask

 

DCMI_FLAG_VSYNCRI: VSYNC

 

flag mask

 

DCMI_FLAG_LINERI: Line flag mask

 

Return value:

 

 

The: state of FLAG.

 

__HAL_DCMI_CLEAR_FLAG

Description:

 

 

Clear the DCMI pending flags.

 

 

Parameters:

 

 

 

__HANDLE__: DCMI handle

 

 

__FLAG__: specifies the flag to clear.

 

 

This parameter can be any combination of

 

 

the following values:

 

 

 

DCMI_FLAG_FRAMERI: Frame

 

 

capture complete flag mask

 

 

 

DCMI_FLAG_OVFRI: Overflow flag

 

 

mask

 

 

 

DCMI_FLAG_ERRRI:

 

 

 

Synchronization error flag mask

 

 

DCMI_FLAG_VSYNCRI: VSYNC

 

 

flag mask

 

 

 

DCMI_FLAG_LINERI: Line flag mask

 

Return value:

 

 

 

None

 

__HAL_DCMI_ENABLE_IT

Description:

 

 

Enable the specified DCMI interrupts.

 

Parameters:

 

 

 

__HANDLE__: DCMI handle

 

 

__INTERRUPT__: specifies the DCMI

 

 

interrupt sources to be enabled. This

 

 

parameter can be any combination of the

 

 

following values:

 

 

 

DCMI_IT_FRAME: Frame capture

 

 

complete interrupt mask

 

 

 

DCMI_IT_OVF: Overflow interrupt

 

 

mask

 

 

 

DCMI_IT_ERR: Synchronization

 

 

error interrupt mask

 

 

 

DCMI_IT_VSYNC: VSYNC interrupt

 

 

mask

 

 

 

DCMI_IT_LINE: Line interrupt mask

 

Return value:

 

DOCID025834 Rev 2

229/900

HAL DCMI Generic Driver

 

UM1725

 

 

None

__HAL_DCMI_DISABLE_IT

Description:

 

Disable the specified DCMI interrupts.

 

Parameters:

 

 

__HANDLE__: DCMI handle

 

__INTERRUPT__: specifies the DCMI

 

 

interrupt sources to be enabled. This

 

 

parameter can be any combination of the

 

 

following values:

 

 

DCMI_IT_FRAME: Frame capture

 

 

complete interrupt mask

 

 

DCMI_IT_OVF: Overflow interrupt

 

 

mask

 

 

DCMI_IT_ERR: Synchronization

 

 

error interrupt mask

 

 

DCMI_IT_VSYNC: VSYNC interrupt

 

 

mask

 

 

DCMI_IT_LINE: Line interrupt mask

 

Return value:

 

 

None

__HAL_DCMI_GET_IT_SOURCE

Description:

 

Check whether the specified DCMI

 

 

interrupt has occurred or not.

 

Parameters:

 

 

__HANDLE__: DCMI handle

 

__INTERRUPT__: specifies the DCMI

 

 

interrupt source to check. This parameter

can be one of the following values:

DCMI_IT_FRAME: Frame capture complete interrupt mask

DCMI_IT_OVF: Overflow interrupt mask

DCMI_IT_ERR: Synchronization error interrupt mask

DCMI_IT_VSYNC: VSYNC interrupt mask

DCMI_IT_LINE: Line interrupt mask

Return value:

The: state of INTERRUPT.

DCMI Extended Data Mode

DCMI_EXTEND_DATA_8B Interface captures 8-bit data on every pixel clock

DCMI_EXTEND_DATA_10B Interface captures 10-bit data on every pixel clock

DCMI_EXTEND_DATA_12B Interface captures 12-bit data on every pixel clock

DCMI_EXTEND_DATA_14B Interface captures 14-bit data on every pixel clock

DCMI Flags

230/900

DOCID025834 Rev 2

UM1725

 

 

HAL DCMI Generic Driver

DCMI_FLAG_HSYNC

 

 

 

DCMI_FLAG_VSYNC

 

 

 

DCMI_FLAG_FNE

 

 

 

DCMI_FLAG_FRAMERI

 

 

 

DCMI_FLAG_OVFRI

 

 

 

DCMI_FLAG_ERRRI

 

 

 

DCMI_FLAG_VSYNCRI

 

 

 

DCMI_FLAG_LINERI

 

 

 

DCMI_FLAG_FRAMEMI

 

 

 

DCMI_FLAG_OVFMI

 

 

 

DCMI_FLAG_ERRMI

 

 

 

DCMI_FLAG_VSYNCMI

 

 

 

DCMI_FLAG_LINEMI

 

 

 

DCMI HSYNC Polarity

 

 

 

DCMI_HSPOLARITY_LOW

Horizontal synchronization active Low

DCMI_HSPOLARITY_HIGH

Horizontal synchronization active High

DCMI interrupt sources

 

 

 

DCMI_IT_FRAME

 

 

 

DCMI_IT_OVF

 

 

 

DCMI_IT_ERR

 

 

 

DCMI_IT_VSYNC

 

 

 

DCMI_IT_LINE

 

 

 

DCMI MODE JPEG

 

 

 

DCMI_JPEG_DISABLE

Mode JPEG Disabled

DCMI_JPEG_ENABLE

Mode JPEG Enabled

DCMI PIXCK Polarity

 

 

 

DCMI_PCKPOLARITY_FALLING

Pixel clock active on Falling edge

DCMI_PCKPOLARITY_RISING

Pixel clock active on Rising edge

DCMI Private Macros

 

 

 

IS_DCMI_CAPTURE_MODE

IS_DCMI_SYNCHRO

IS_DCMI_PCKPOLARITY

IS_DCMI_VSPOLARITY

IS_DCMI_HSPOLARITY

IS_DCMI_MODE_JPEG

IS_DCMI_CAPTURE_RATE

DOCID025834 Rev 2

231/900

HAL DCMI Generic Driver

UM1725

IS_DCMI_EXTENDED_DATA

 

IS_DCMI_WINDOW_COORDINATE

IS_DCMI_WINDOW_HEIGHT

 

DCMI Synchronization Mode

 

DCMI_SYNCHRO_HARDWARE

Hardware synchronization data capture (frame/line

 

start/stop) is synchronized with the HSYNC/VSYNC

 

signals

DCMI_SYNCHRO_EMBEDDED

Embedded synchronization data capture is

 

synchronized with synchronization codes embedded in

 

the data flow

DCMI VSYNC Polarity

 

DCMI_VSPOLARITY_LOW

Vertical synchronization active Low

DCMI_VSPOLARITY_HIGH

Vertical synchronization active High

DCMI Window Coordinate

DCMI_WINDOW_COORDINATE Window coordinate

DCMI Window Height

DCMI_WINDOW_HEIGHT Window Height

232/900

DOCID025834 Rev 2

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]