Subversion Repositories Kolibri OS

Rev

Rev 6102 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.  
  2.  
  3. #ifndef __DDK_H__
  4. #define __DDK_H__
  5.  
  6. #include <linux/kernel.h>
  7. #include <linux/errno.h>
  8. #include <linux/spinlock.h>
  9. #include <linux/mutex.h>
  10. #include <linux/rwsem.h>
  11. //#include <stdint.h>
  12.  
  13. #define OS_BASE             0x80000000
  14.  
  15. #define PG_SW               0x003
  16. #define PG_UW               0x007
  17. #define PG_WRITEC           0x008
  18. #define PG_NOCACHE          0x018
  19. #define PG_SHARED           0x200
  20.  
  21. #define MANUAL_DESTROY      0x80000000
  22.  
  23. #define ENTER()   dbgprintf("enter %s\n",__FUNCTION__)
  24. #define LEAVE()   dbgprintf("leave %s\n",__FUNCTION__)
  25. #define FAIL()    dbgprintf("fail %s\n",__FUNCTION__)
  26. #define LINE()    dbgprintf("%s line %d\n", __FUNCTION__,__LINE__)
  27.  
  28. typedef struct
  29. {
  30.   u32        handle;
  31.   u32        io_code;
  32.   void       *input;
  33.   int        inp_size;
  34.   void       *output;
  35.   int        out_size;
  36. }ioctl_t;
  37.  
  38. typedef int ( __stdcall *srv_proc_t)(ioctl_t *);
  39.  
  40. #define ERR_OK       0
  41. #define ERR_PARAM   -1
  42.  
  43.  
  44. struct ddk_params;
  45.  
  46. int   ddk_init(struct ddk_params *params);
  47.  
  48. u32 drvEntry(int, char *)__asm__("_drvEntry");
  49.  
  50.  
  51. #endif      /*    DDK_H    */
  52.