Subversion Repositories Kolibri OS

Rev

Rev 1627 | Rev 3031 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. #ifndef __DDK_H__
  4. #define __DDK_H__
  5.  
  6. #include <kernel.h>
  7. #include <mutex.h>
  8.  
  9.  
  10. #define OS_BASE             0x80000000
  11.  
  12. #define PG_SW               0x003
  13. #define PG_NOCACHE          0x018
  14.  
  15. #define MANUAL_DESTROY      0x80000000
  16.  
  17. #define ENTER()   dbgprintf("enter %s\n",__FUNCTION__)
  18. #define LEAVE()   dbgprintf("leave %s\n",__FUNCTION__)
  19.  
  20. typedef struct
  21. {
  22.     u32_t  code;
  23.     u32_t  data[5];
  24. }kevent_t;
  25.  
  26. typedef union
  27. {
  28.     struct
  29.     {
  30.         u32_t handle;
  31.         u32_t euid;
  32.     };
  33.     u64_t raw;
  34. }evhandle_t;
  35.  
  36. typedef struct
  37. {
  38.   u32_t      handle;
  39.   u32_t      io_code;
  40.   void       *input;
  41.   int        inp_size;
  42.   void       *output;
  43.   int        out_size;
  44. }ioctl_t;
  45.  
  46. typedef int (__stdcall *srv_proc_t)(ioctl_t *);
  47.  
  48. #define ERR_OK       0
  49. #define ERR_PARAM   -1
  50.  
  51.  
  52. struct ddk_params;
  53.  
  54. int   ddk_init(struct ddk_params *params);
  55.  
  56. u32_t drvEntry(int, char *)__asm__("_drvEntry");
  57.  
  58.  
  59.  
  60.  
  61.  
  62. #endif      /*    DDK_H    */
  63.