RTEMS 6.1-rc4
Loading...
Searching...
No Matches
fsl_flexio_camera.h
1/*
2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
3 * Copyright 2016-2020 NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _FSL_FLEXIO_CAMERA_H_
10#define _FSL_FLEXIO_CAMERA_H_
11
12#include "fsl_common.h"
13#include "fsl_flexio.h"
19/*******************************************************************************
20 * Definitions
21 ******************************************************************************/
22
26#define FSL_FLEXIO_CAMERA_DRIVER_VERSION (MAKE_VERSION(2, 1, 3))
30#define FLEXIO_CAMERA_PARALLEL_DATA_WIDTH (8U)
31
33enum
34{
37};
38
41{
44};
45
49typedef struct _flexio_camera_type
50{
52 uint32_t datPinStartIdx;
55 uint32_t pclkPinIdx;
56 uint32_t hrefPinIdx;
58 uint32_t shifterStartIdx;
59 uint32_t shifterCount;
60 uint32_t timerIdx;
62
65{
73
76{
77 uint32_t dataAddress;
78 uint32_t dataNum;
80
81/*******************************************************************************
82 * API
83 ******************************************************************************/
84
85#if defined(__cplusplus)
86extern "C" {
87#endif /*_cplusplus*/
88
101
110
122
129static inline void FLEXIO_CAMERA_Enable(FLEXIO_CAMERA_Type *base, bool enable)
130{
131 if (enable)
132 {
133 base->flexioBase->CTRL |= FLEXIO_CTRL_FLEXEN_MASK;
134 }
135}
136
153
164
165/* @} */
166
178
186
206static inline void FLEXIO_CAMERA_EnableRxDMA(FLEXIO_CAMERA_Type *base, bool enable)
207{
208 FLEXIO_EnableShifterStatusDMA(base->flexioBase, 1UL << base->shifterStartIdx, enable);
209}
210
217static inline uint32_t FLEXIO_CAMERA_GetRxBufferAddress(FLEXIO_CAMERA_Type *base)
218{
219 return FLEXIO_GetShifterBufferAddress(base->flexioBase, kFLEXIO_ShifterBuffer, (uint8_t)base->shifterStartIdx);
220}
221
224#if defined(__cplusplus)
225}
226#endif /*_cplusplus*/
227
230#endif /*_FSL_FLEXIO_CAMERA_H_*/
FLEXIO_Type * flexioBase
Definition: fsl_flexio_camera.h:51
_flexio_camera_status_flags
Define FlexIO Camera status mask.
Definition: fsl_flexio_camera.h:41
void FLEXIO_CAMERA_Deinit(FLEXIO_CAMERA_Type *base)
Resets the FLEXIO_CAMERA shifer and timer config.
uint32_t shifterStartIdx
Definition: fsl_flexio_camera.h:58
void FLEXIO_CAMERA_ClearStatusFlags(FLEXIO_CAMERA_Type *base, uint32_t mask)
Clears the receive buffer full flag manually.
struct _flexio_camera_config flexio_camera_config_t
Define FlexIO Camera user configuration structure.
uint32_t hrefPinIdx
Definition: fsl_flexio_camera.h:56
void FLEXIO_CAMERA_Init(FLEXIO_CAMERA_Type *base, const flexio_camera_config_t *config)
Ungates the FlexIO clock, resets the FlexIO module, and configures the FlexIO Camera.
void FLEXIO_CAMERA_DisableInterrupt(FLEXIO_CAMERA_Type *base)
Switches off the interrupt for receive buffer full event.
uint32_t datPinStartIdx
Definition: fsl_flexio_camera.h:52
void FLEXIO_CAMERA_GetDefaultConfig(flexio_camera_config_t *config)
Gets the default configuration to configure the FlexIO Camera. The configuration can be used directly...
bool enablecamera
Definition: fsl_flexio_camera.h:66
uint32_t dataNum
Definition: fsl_flexio_camera.h:78
uint32_t shifterCount
Definition: fsl_flexio_camera.h:59
bool enableInDoze
Definition: fsl_flexio_camera.h:67
struct _flexio_camera_transfer flexio_camera_transfer_t
Define FlexIO Camera transfer structure.
uint32_t dataAddress
Definition: fsl_flexio_camera.h:77
bool enableInDebug
Definition: fsl_flexio_camera.h:68
uint32_t pclkPinIdx
Definition: fsl_flexio_camera.h:55
uint32_t timerIdx
Definition: fsl_flexio_camera.h:60
uint32_t FLEXIO_CAMERA_GetStatusFlags(FLEXIO_CAMERA_Type *base)
Gets the FlexIO Camera status flags.
void FLEXIO_CAMERA_EnableInterrupt(FLEXIO_CAMERA_Type *base)
Switches on the interrupt for receive buffer full event.
struct _flexio_camera_type FLEXIO_CAMERA_Type
Define structure of configuring the FlexIO Camera device.
bool enableFastAccess
Definition: fsl_flexio_camera.h:69
@ kFLEXIO_CAMERA_RxDataRegFullFlag
Definition: fsl_flexio_camera.h:42
@ kFLEXIO_CAMERA_RxErrorFlag
Definition: fsl_flexio_camera.h:43
@ kStatus_FLEXIO_CAMERA_RxIdle
Definition: fsl_flexio_camera.h:36
@ kStatus_FLEXIO_CAMERA_RxBusy
Definition: fsl_flexio_camera.h:35
uint32_t FLEXIO_GetShifterBufferAddress(FLEXIO_Type *base, flexio_shifter_buffer_type_t type, uint8_t index)
Gets the shifter buffer address for the DMA transfer usage.
Definition: fsl_flexio.c:173
@ kFLEXIO_ShifterBuffer
Definition: fsl_flexio.h:223
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_FLEXIO_CAMERA
Definition: fsl_common.h:127
Definition: MIMXRT1052.h:20511
Define FlexIO Camera user configuration structure.
Definition: fsl_flexio_camera.h:65
Define FlexIO Camera transfer structure.
Definition: fsl_flexio_camera.h:76
Define structure of configuring the FlexIO Camera device.
Definition: fsl_flexio_camera.h:50
Definition: deflate.c:114