Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
cam.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2026 Efinix Inc. All rights reserved.
3// Full license header bsp/efinix/EfxSapphireSocRV64/include/LICENSE.MD
5
6#ifndef SRC_CAM_H_
7#define SRC_CAM_H_
8
19
20#include "i2c/i2c.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
37
38
39/* ========================================================================== */
40/* SUB-GROUP : Data Types */
41/* ========================================================================== */
42
49
55
56
60 typedef enum {
61 CAM_OK = 0,
62 CAM_ERR = 1,
66 // End of CAM_ENUM group
68
69
70/* ========================================================================== */
71/* SUB-GROUP : DATA STRUCTS */
72/* ========================================================================== */
105
108
118
131 // End of CAM_Types group
133
134/* ========================================================================== */
135/* SUB-GROUP: FUNCTIONS */
136/* ========================================================================== */
137
151 void cam_writeReg(cam_instance_t *cam, u16 reg, u8 data);
155 u8 cam_readReg(cam_instance_t *cam, u16 reg); // End of CAM Public API - String Based Functions group
157 // End of CAM_Funcs group
159
160/* ========================================================================== */
161/* SUB-GROUP: CAMERA CONFIGURATION */
162/* ========================================================================== */
163
165 #include "cam/cam_config.h"
166
167
168#ifdef __cplusplus
169}
170#endif // End of MAIN CAM Group
172
173#endif /* SRC_CAM_H_ */
Camera Configuration and Driver Selection.
cam_status_t
CAM Status List.
Definition cam.h:60
@ CAM_OK
Successful Operation *‍/.
Definition cam.h:61
@ CAM_SKIP
Skip the function *‍/.
Definition cam.h:64
@ CAM_USER_ERR
User provide wrong input *‍/.
Definition cam.h:63
@ CAM_ERR
Failed to retrieve/write value *‍/.
Definition cam.h:62
void cam_writeReg(cam_instance_t *cam, u16 reg, u8 data)
Write Data to specific register in camera.
Definition cam.c:19
u8 cam_readReg(cam_instance_t *cam, u16 reg)
Read Data from specific register in camera.
Definition cam.c:44
struct cam_instance cam_instance_t
Forward declaration of CAM instance.
Definition cam.h:107
I2C driver API definitions.
CAM API structure.
Definition cam.h:113
cam_status_t(* cam_stopStreaming)(cam_instance_t *cam)
Set time system function pointer *‍/.
Definition cam.h:116
cam_status_t(* cam_startStreaming)(cam_instance_t *cam)
Set time function pointer *‍/.
Definition cam.h:115
cam_status_t(* cam_init)(cam_instance_t *cam)
Get time function pointer *‍/.
Definition cam.h:114
CAM instance structure.
Definition cam.h:127
const cam_api_t * drv
Pointer to CAM API structure *‍/.
Definition cam.h:129
i2c_instance_t * inst
Pointer to I2C instance *‍/.
Definition cam.h:128
I2C instance. Holds the software registers and hardware pointer.
Definition i2c.h:259
uint8_t u8
Definition type.h:26
uint16_t u16
Definition type.h:24