Top |
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.
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); };