Image driver structures

Image driver structures — Image driver structures

Types and Values


#include <fpi-core.h>


Image driver structures need to be defined inside each image driver in order for the core library to know what function to call, and the capabilities of the driver and the devices it supports. Its structure is based off the fp_driver struct.


Types and Values

enum FpiImgDriverFlags

Flags used in the fp_img_driver to advertise the capabilities of drivers.



Whether the driver supports unconditional image capture. No driver currently does.


struct fp_img_driver

struct fp_img_driver {
	struct fp_driver driver;
	FpiImgDriverFlags flags;
	int img_width;
	int img_height;
	int bz3_threshold;

	/* Device operations */
	int (*open)(struct fp_img_dev *dev, unsigned long driver_data);
	void (*close)(struct fp_img_dev *dev);
	int (*activate)(struct fp_img_dev *dev);
	int (*change_state)(struct fp_img_dev *dev, enum fp_imgdev_state state);
	void (*deactivate)(struct fp_img_dev *dev);