]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/fvid2.git/blobdiff - include/fvid2_drvMgr.h
FVID2 build fix and fixed review comments
[keystone-rtos/fvid2.git] / include / fvid2_drvMgr.h
index b49288c93305bc8e0f826f62b317500332baab5a..6c8b29435b3cccf5d6aadfa8d35ac9849490f125 100644 (file)
@@ -1,5 +1,5 @@
-/* =============================================================================
- *   Copyright (c) Texas Instruments Incorporated 2012-2018
+/*
+ *  Copyright (c) Texas Instruments Incorporated 2012-2018
  *
  *  Redistribution and use in source and binary forms, with or without
  *  modification, are permitted provided that the following conditions
@@ -64,10 +64,8 @@ extern "C" {
 /** \brief Number of channel object to allocate in FVID2 library. */
 #define FVID2_CFG_FDM_NUM_CH_OBJS           (80U)
 
-
-
 /** \brief FVID2 driver handle returned by individual drivers. */
-typedef Ptr Fdrv_Handle;
+typedef void *Fdrv_Handle;
 
 /** \brief Typedef for callback function parameters. */
 typedef struct Fvid2_DrvCbParams_t Fvid2_DrvCbParams;
@@ -79,10 +77,8 @@ typedef struct Fvid2_DrvCbParams_t Fvid2_DrvCbParams;
  *
  *  fdmData: FVID2 driver manager internal data passed to driver during create
  *  call.
- *
- *  reserved: For future use. Not used currently. This will be set to NULL.
  */
-typedef Int32 (*Fdm_CbFxn)(Ptr fdmData, Ptr reserved);
+typedef int32_t (*Fdm_CbFxn)(void *fdmData);
 
 /**
  *  \brief Typedef for FVID2 driver error callback function prototype.
@@ -94,48 +90,46 @@ typedef Int32 (*Fdm_CbFxn)(Ptr fdmData, Ptr reserved);
  *
  *  errList: Error data passed to the application.
  *
- *  reserved: For future use. Not used currently. This will be set to NULL.
  */
-typedef Int32 (*Fdm_ErrCbFxn)(Ptr fdmData, void *errList, Ptr reserved);
+typedef int32_t (*Fdm_ErrCbFxn)(void *fdmData, void *errList);
 
 /** \brief Typedef for FVID2 create function pointer. */
-typedef Fdrv_Handle (*Fvid2_DrvCreate)(UInt32                   drvId,
-                                       UInt32                   instanceId,
-                                       Ptr                      createArgs,
-                                       Ptr
-                                       createStatusArgs,
+typedef Fdrv_Handle (*Fvid2_DrvCreate)(uint32_t      drvId,
+                                       uint32_t      instanceId,
+                                       void        *createArgs,
+                                       void        *createStatusArgs,
                                        const Fvid2_DrvCbParams *fdmCbParams);
 
 /** \brief Typedef for FVID2 delete function pointer. */
-typedef Int32 (*Fvid2_DrvDelete)(Fdrv_Handle handle, Ptr deleteArgs);
+typedef int32_t (*Fvid2_DrvDelete)(Fdrv_Handle handle, void *deleteArgs);
 
 /** \brief Typedef for FVID2 control function pointer. */
-typedef Int32 (*Fvid2_DrvControl)(Fdrv_Handle handle,
-                                  UInt32      cmd,
-                                  Ptr         cmdArgs,
-                                  Ptr         cmdStatusArgs);
+typedef int32_t (*Fvid2_DrvControl)(Fdrv_Handle handle,
+                                    uint32_t    cmd,
+                                    void       *cmdArgs,
+                                    void       *cmdStatusArgs);
 
 /** \brief Typedef for FVID2 queue function pointer. */
-typedef Int32 (*Fvid2_DrvQueue)(Fdrv_Handle      handle,
-                                Fvid2_FrameList *frameList,
-                                UInt32           streamId);
+typedef int32_t (*Fvid2_DrvQueue)(Fdrv_Handle       handle,
+                                  Fvid2_FrameList  *frameList,
+                                  uint32_t          streamId);
 
 /** \brief Typedef for FVID2 dequeue function pointer. */
-typedef Int32 (*Fvid2_DrvDequeue)(Fdrv_Handle      handle,
-                                  Fvid2_FrameList *frameList,
-                                  UInt32           streamId,
-                                  UInt32           timeout);
+typedef int32_t (*Fvid2_DrvDequeue)(Fdrv_Handle     handle,
+                                    Fvid2_FrameList *frameList,
+                                    uint32_t        streamId,
+                                    uint32_t        timeout);
 
 /** \brief Typedef for FVID2 process frames function pointer. */
-typedef Int32 (*Fvid2_DrvProcessRequest)(Fdrv_Handle        handle,
-                                         Fvid2_FrameList   *inProcessList,
-                                         Fvid2_FrameList   *outProcessList);
+typedef int32_t (*Fvid2_DrvProcessRequest)(Fdrv_Handle      handle,
+                                           Fvid2_FrameList *inProcessList,
+                                           Fvid2_FrameList *outProcessList);
 
 /** \brief Typedef for FVID2 get processed frames function pointer. */
-typedef Int32 (*Fvid2_DrvGetProcessedRequest)(Fdrv_Handle        handle,
-                                              Fvid2_FrameList   *inProcessList,
-                                              Fvid2_FrameList   *outProcessList,
-                                              UInt32             timeout);
+typedef int32_t (*Fvid2_DrvGetProcessedRequest)(Fdrv_Handle     handle,
+                                                Fvid2_FrameList *inProcessList,
+                                                Fvid2_FrameList *outProcessList,
+                                                uint32_t        timeout);
 
 
 /* ========================================================================== */
@@ -161,11 +155,9 @@ struct Fvid2_DrvCbParams_t
     void        *errList;
     /**< Pointer to a valid framelist or processlist where the driver
      *   copies the aborted/error packet. */
-    Ptr          fdmData;
+    void        *fdmData;
     /**< FDM specific data which is returned in the callback function
      *   as it is. */
-    Ptr          reserved;
-    /**< For future use. Not used currently. Set this to NULL. */
 };
 
 /**
@@ -174,7 +166,7 @@ struct Fvid2_DrvCbParams_t
  */
 typedef struct
 {
-    UInt32                      drvId;
+    uint32_t                    drvId;
     /**< Unique driver Id. */
     Fvid2_DrvCreate             createFxn;
     /**< FVID2 create function pointer. */
@@ -209,7 +201,7 @@ typedef struct
  *
  *  \return             Returns 0 on success else returns error value.
  */
-Int32 Fvid2_registerDriver(const Fvid2_DrvOps *drvOps);
+int32_t Fvid2_registerDriver(const Fvid2_DrvOps *drvOps);
 
 /**
  *  Fvid2_unRegisterDriver
@@ -222,7 +214,7 @@ Int32 Fvid2_registerDriver(const Fvid2_DrvOps *drvOps);
  *
  *  \return             Returns 0 on success else returns error value.
  */
-Int32 Fvid2_unRegisterDriver(const Fvid2_DrvOps *drvOps);
+int32_t Fvid2_unRegisterDriver(const Fvid2_DrvOps *drvOps);
 
 /**
  *  Fvid2_checkFrameList
@@ -236,7 +228,8 @@ Int32 Fvid2_unRegisterDriver(const Fvid2_DrvOps *drvOps);
  *
  *  \return             Returns 0 on success else returns error value.
  */
-Int32 Fvid2_checkFrameList(const Fvid2_FrameList *frameList, UInt32 maxFrames);
+int32_t Fvid2_checkFrameList(const Fvid2_FrameList *frameList,
+                             uint32_t maxFrames);
 
 /**
  *  Fvid2_checkDqFrameList
@@ -252,8 +245,8 @@ Int32 Fvid2_checkFrameList(const Fvid2_FrameList *frameList, UInt32 maxFrames);
  *
  *  \return             Returns 0 on success else returns error value.
  */
-Int32 Fvid2_checkDqFrameList(const Fvid2_FrameList *frameList,
-                             UInt32                 maxFrames);
+int32_t Fvid2_checkDqFrameList(const Fvid2_FrameList   *frameList,
+                               uint32_t                 maxFrames);
 
 /**
  *  Fvid2_copyFrameList