MAX78002 Peripheral Driver API
Peripheral Driver API for the MAX78002
cameraif.h
1
6/******************************************************************************
7 *
8 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
9 * Analog Devices, Inc.),
10 * Copyright (C) 2023-2024 Analog Devices, Inc.
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 ******************************************************************************/
25
26/* Define to prevent redundant inclusion */
27#ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_CAMERAIF_H_
28#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_CAMERAIF_H_
29
30/* **** Includes **** */
31#include "mxc_device.h"
32#include "cameraif_regs.h"
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
44/* **** Definitions **** */
45
50typedef enum {
51 MXC_PCIF_DATAWIDTH_8_BIT = 0,
52 MXC_PCIF_DATAWIDTH_10_BIT,
53 MXC_PCIF_DATAWIDTH_12_BIT,
55
60typedef enum {
61 MXC_PCIF_GPIO_DATAWIDTH_8_BIT = 0,
62 MXC_PCIF_GPIO_DATAWIDTH_10_BIT,
63 MXC_PCIF_GPIO_DATAWIDTH_12_BIT,
65
70typedef enum {
71 MXC_PCIF_READMODE_SINGLE_MODE = 1,
72 MXC_PCIF_READMODE_CONTINUES_MODE,
74
79typedef enum {
80 MXC_PCIF_TIMINGSEL_HSYNC_and_VSYNC = 0,
81 MXC_PCIF_TIMINGSEL_SAV_and_EAV,
83
84/* **** Function Prototypes **** */
85
94
101
108
114void MXC_PCIF_SetThreshold(int fifo_thrsh);
115
121void MXC_PCIF_EnableInt(uint32_t flags);
122
128void MXC_PCIF_DisableInt(uint32_t flags);
129
136
141void MXC_PCIF_Stop(void);
142
148unsigned int MXC_PCIF_GetData(void);
149
152#ifdef __cplusplus
153}
154#endif
155
156#endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_CAMERAIF_H_
Registers, Bit Masks and Bit Positions for the CAMERAIF Peripheral Module.
void MXC_PCIF_SetThreshold(int fifo_thrsh)
Set camera FIFO threshold.
mxc_pcif_readmode_t
The list of Camera Interface ReadMode options supported.
Definition: cameraif.h:70
unsigned int MXC_PCIF_GetData(void)
Read fifo of PCIF.
void MXC_PCIF_SetDataWidth(mxc_pcif_datawidth_t datawidth)
Set data width for the camera interface.
mxc_pcif_timingsel_t
The list of Camera Interface TimingSel options supported.
Definition: cameraif.h:79
int MXC_PCIF_Init(mxc_pcif_gpio_datawidth_t gpioDataWidth)
Initialize the Parallel Camera Interface.
mxc_pcif_gpio_datawidth_t
The list of Camera GPIO Datawidth options supported.
Definition: cameraif.h:60
void MXC_PCIF_DisableInt(uint32_t flags)
Disable camera interrupts.
void MXC_PCIF_Start(mxc_pcif_readmode_t readmode)
Start to capture image from camera interface.
void MXC_PCIF_EnableInt(uint32_t flags)
Enable camera interrupts.
void MXC_PCIF_Stop(void)
Stop capture, disable Parallel camera interface.
void MXC_PCIF_SetTimingSel(mxc_pcif_timingsel_t timingsel)
Set the desired timing mode for the camera interface.
mxc_pcif_datawidth_t
The list of Camera Interface Datawidth options supported.
Definition: cameraif.h:50