RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
Data Structures

Overview

Structs used by the driver.

Note

This is an example show how to instantiate CAM with cam_instance_t, cam_api_t.

#include "cam/cam.h"
#define I2C_CTRL_HZ SYSTEM_CLINT_HZ
#define I2C_CTRL (i2c_hwreg_t *)SYSTEM_I2C_0_IO_CTRL
#define I2C_FREQ 100000
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),
},
};
CAM driver API definitions.
#define CAM_CTRL
I2C Address for the currently selected cam (IMX708).
Definition cam_config.h:57
#define CAM_DRIVER
Driver Interface Table for the currently selected cam (IMX708).
Definition cam_config.h:62
I2C instance. Holds the software registers and hardware pointer.
Definition i2c.h:290

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 137 of file cam.h.