]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/fvid2.git/commitdiff
Added timestamp prms and driver IDs
authorSivaraj R <sivaraj@ti.com>
Tue, 10 Apr 2018 18:49:38 +0000 (00:19 +0530)
committerSivaraj R <sivaraj@ti.com>
Wed, 11 Apr 2018 05:35:08 +0000 (11:05 +0530)
Signed-off-by: Sivaraj R <sivaraj@ti.com>
include/fvid2_api.h

index 3ccdb405d163796b17db937cefe339cdfcf79a17..eceacb824c12a3409f82f5ce943a6222a3cc1759 100644 (file)
@@ -313,6 +313,15 @@ typedef int32_t (*Fvid2_ErrCbFxn)(Fvid2_Handle handle,
 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
  *  @{
@@ -376,8 +385,50 @@ typedef int32_t (*Fvid2_SubFrameCbFxn)(Fvid2_Handle handle,
  */
 #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                             */
 /* ========================================================================== */
@@ -417,6 +468,29 @@ typedef struct
      *   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                             */
 /* ========================================================================== */