lib: Transform fp_img_driver flags into a FpiImgDriverFlags enum

And document it.
This commit is contained in:
Bastien Nocera 2018-11-12 13:59:26 +01:00
parent 882fc8ab54
commit 8ca34303f2
2 changed files with 12 additions and 4 deletions

View file

@ -234,7 +234,7 @@ fp_driver_type
<SECTION>
<INCLUDE>fpi-core.h</INCLUDE>
<FILE>fpi-core-img</FILE>
FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE
FpiImgDriverFlags
fp_img_driver
</SECTION>

View file

@ -55,12 +55,20 @@ struct fp_driver {
int (*capture_stop)(struct fp_dev *dev);
};
/* flags for fp_img_driver.flags */
#define FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE (1 << 0)
/**
* FpiImgDriverFlags:
* @FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE: Whether the driver supports
* unconditional image capture. No driver currently does.
*
* Flags used in the #fp_img_driver to advertise the capabilities of drivers.
*/
typedef enum {
FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE = 1 << 0
} FpiImgDriverFlags;
struct fp_img_driver {
struct fp_driver driver;
uint16_t flags;
FpiImgDriverFlags flags;
int img_width;
int img_height;
int bz3_threshold;