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
Data Structures

Overview

Structs used by the driver.

Note
This is example show how to instantiate CAM with CAM_instance_t, cam_api_t.
#define I2C_CTRL_HZ SYSTEM_CLINT_HZ
#define I2C_CTRL (i2c_hwreg_t *)SYSTEM_I2C_1_IO_CTRL
#define I2C_FREQ 100000
#define CAM_CTRL IMX219_ADDR
#define CAM_DRIVER imx219_driver
CAM_instance_t CAM = {
.drv = &CAM_DRIVER,
.inst = &(i2c_instance_t){
.hwreg = I2C_CTRL,
.slaveAddress = CAM_CTRL,
.samplingClockDivider = 3,
.timeout = I2C_CTRL_HZ/1000,
.tsuDat = I2C_CTRL_HZ/(I2C_FREQ*5),
.tLow = I2C_CTRL_HZ/(I2C_FREQ*2),
.tHigh = I2C_CTRL_HZ/(I2C_FREQ*2),
.tBuf = I2C_CTRL_HZ/(I2C_FREQ),
},
};
#define CAM_CTRL
I2C Address for the currently selected cam (IMX708).
Definition cam_config.h:53
#define CAM_DRIVER
Driver Interface Table for the currently selected cam (IMX708).
Definition cam_config.h:58
I2C instance. Holds the software registers and hardware pointer.
Definition i2c.h:259

Data Structures

struct  cam_api_t
 CAM API structure. More...
struct  cam_instance
 CAM instance structure. More...

Typedefs

typedef struct cam_instance cam_instance_t
 Forward declaration of CAM instance.

Typedef Documentation

◆ cam_instance_t

typedef struct cam_instance cam_instance_t

#include <cam.h>

Forward declaration of CAM instance.

Definition at line 107 of file cam.h.