1 /****************************************************************/
\r
2 /**@file hudaq_internal.h:
\r
3 * Description: Internal hudaq header with private information. *
\r
4 * Dependency: Only for Linux *
\r
5 * Copyright 2006-2010 Jaroslav Fojtik *
\r
6 ****************************************************************/
\r
8 #ifndef HUDAQ_INTERNAL_H__
\r
9 #define HUDAQ_INTERNAL_H__
\r
14 #define __int16 short int
\r
18 #define max(x,y) (((x) > (y)) ? (x) : (y))
\r
21 #define min(x,y) (((x) > (y)) ? (x) : (y))
\r
26 * Resource information structure obtained from low level kernel driver.
\r
30 size_t Size; ///< Size of this structure.
\r
31 int NumPhysMemResources; ///< Amount of memory-mapped ranges in particular device.
\r
32 HudaqResourceRange PhysMemResources[8]; ///< Memory resources available for user access.
\r
33 HudaqResourceInfo Resources; ///< External structure for users
\r
34 size_t DriverDataSize; ///< Size of shared memory among all applications.
\r
35 void* DriverData; ///< Internal data for one device shared across all applications.
\r
36 unsigned int UioDevNum; ///< Which UIO device handles our card
\r
37 // TODO: these two items are planned to be filled from kernel driver
\r
41 typedef struct CallTable;
\r
43 /** Device record that contains common information about general device resources. */
\r
46 //HANDLE SysHandle; ///< System handle assigned from kernel driver
\r
47 char Name[256]; ///< Device name in ASCII
\r
48 int Order; ///< Order of device
\r
49 DriverRecord DrvRes; ///< Kernel resource info
\r
51 const struct CallTable *pCT; ///< Interface functions
\r
55 #include "hudaq_int_common.h"
\r
58 #if __GNUC__ == 3 && __GNUC_MINOR__ >= 3
\r
61 #define HUDAQAPI __attribute__ ((visibility("default")))
\r
62 #pragma visibility(hidden)
\r
66 int timeGetTime(void);
\r