Subversion Repositories Kolibri OS

Rev

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

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