diff --git a/include/fvid2_api.h b/include/fvid2_api.h
index 3ccdb405d163796b17db937cefe339cdfcf79a17..eceacb824c12a3409f82f5ce943a6222a3cc1759 100644 (file)
--- a/include/fvid2_api.h
+++ b/include/fvid2_api.h
typedef int32_t (*Fvid2_SubFrameCbFxn)(Fvid2_Handle handle,
Fvid2_Frame *subFrame);
+/**
+ * \brief Function prototype, to determine the time stamp.
+ *
+ * \param args [IN] Not used as of now.
+ *
+ * \return An unsigned int 64 value, that represents the current time in usec.
+ */
+typedef uint64_t (*Fvid2_TimeStampFxn)(void *args);
+
/**
* \name FVID2 Max limits
* @{
*/
#define FVID2_STOP ((uint32_t) FVID2_CTRL_BASE + 6U)
+/**
+ * \brief Register an application function (pointer) for getting the
+ * time stamp value used at the frame completion time.
+ *
+ * The same IOCTL could be used to un-register the existing time stamp
+ * function by passing NULL to the function pointer.
+ *
+ * \param cmdArgs [IN] const Fvid2_TimeStampParams *
+ * \param cmdArgsStatus NULL
+ *
+ * \return FVID2_SOK on success, else failure.
+ */
+#define FVID2_REGISTER_TIMESTAMP_FXN ((uint32_t) FVID2_CTRL_BASE + 7U)
+
/* @} */
+/*
+ * Driver ID Base.
+ */
+/** \brief Driver ID base for the DSS driver class. */
+#define FVID2_DSS_DRV_BASE (0x00001000U)
+/** \brief Driver ID base for the CAL driver class. */
+#define FVID2_CAL_DRV_BASE (0x00002000U)
+/** \brief Driver ID base for the CSIRX driver class. */
+#define FVID2_CSIRX_DRV_BASE (0x00003000U)
+/** \brief Driver ID base for the CSITX driver class. */
+#define FVID2_CSITX_DRV_BASE (0x00004000U)
+/** \brief Driver ID base for the VHWA driver class. */
+#define FVID2_VHWA_DRV_BASE (0x00005000U)
+
+/*
+ * IOCTLs Base.
+ */
+/** \brief IOCTL base for the DSS driver class. */
+#define FVID2_DSS_DRV_IOCTL_BASE (FVID2_USER_BASE + FVID2_DSS_DRV_BASE)
+/** \brief IOCTL base for the CAL driver class. */
+#define FVID2_CAL_DRV_IOCTL_BASE (FVID2_USER_BASE + FVID2_CAL_DRV_BASE)
+/** \brief IOCTL base for the CSIRX driver class. */
+#define FVID2_CSIRX_DRV_IOCTL_BASE (FVID2_USER_BASE + FVID2_CSIRX_DRV_BASE)
+/** \brief IOCTL base for the CSITX driver class. */
+#define FVID2_CSITX_DRV_IOCTL_BASE (FVID2_USER_BASE + FVID2_CSITX_DRV_BASE)
+/** \brief IOCTL base for the VHWA driver class. */
+#define FVID2_VHWA_DRV_IOCTL_BASE (FVID2_USER_BASE + FVID2_VHWA_DRV_BASE)
+
/* ========================================================================== */
/* Structure Declarations */
/* ========================================================================== */
* as it is. This could be set to NULL if not used. */
} Fvid2_CbParams;
+/**
+ * \brief Structure used to configure time stamping of frames.
+ */
+typedef struct
+{
+ Fvid2_TimeStampFxn timeStampFxn;
+ /**< By default, OSAL (BIOS) API is used to time stamp frames.
+ *
+ * Applications could over-ride the same, by providing a
+ * function that would return an unsigned int 64 value representing the
+ * timestamp in usec.
+ * The driver would call this function and update the 'timeStamp'
+ * and 'timeStamp64' member of #Fvid2_Frame with the return
+ * value of this function.
+ *
+ * Note: The 64-bit value / 1000 is used to update the 'timeStamp'
+ * member.
+ *
+ * Passing a value of NULL un-registers the time stamp function. */
+ uint32_t reserved;
+ /**< Not used now. Set to zero. */
+} Fvid2_TimeStampParams;
+
/* ========================================================================== */
/* Function Declarations */
/* ========================================================================== */