i2o.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* i2o.h - Header file for the I2O`s interface */
  2. /* Copyright - Galileo technology. */
  3. #ifndef __INCi2oh
  4. #define __INCi2oh
  5. /* includes */
  6. #include "core.h"
  7. /* typedefs */
  8. typedef enum _i2oMessageReg{MESSAGE_REG_0,MESSAGE_REG_1} I2O_MESSAGE_REG;
  9. typedef enum _cirQueSize{I20_16K = 0x1,I20_32K = 0x2,I20_64K = 0x4,
  10.                   I20_128K = 0x8,I20_256K = 0xc} CIRCULAR_QUEUE_SIZE;
  11. /* Message handle Functions */
  12. unsigned int    getInBoundMassege(I2O_MESSAGE_REG messageRegNum);
  13. bool  sendOutBoundMassege(I2O_MESSAGE_REG messageRegNum,unsigned int message);
  14. bool  checkInBoundIntAndClear(I2O_MESSAGE_REG messageRegNum);
  15. bool  outBoundMessageAcknowledge(I2O_MESSAGE_REG messageRegNum);
  16. bool  maskInBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
  17. bool  enableInBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
  18. bool  maskOutBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
  19. bool  enableOutBoundMessageInterrupt(I2O_MESSAGE_REG messageRegNum);
  20. /* Doorbell handle Functions */
  21. unsigned int    readInBoundDoorBellInt(void);
  22. bool  initiateOutBoundDoorBellInt(unsigned int interruptBits);
  23. bool  clearInBoundDoorBellInt(unsigned int interruptBits);
  24. bool  isInBoundDoorBellInterruptSet(void);
  25. bool  isOutBoundDoorBellInterruptSet(void); /* For acknowledge */
  26. bool  maskInBoundDoorBellInterrupt(void);
  27. bool  enableInBoundDoorBellInterrupt(void);
  28. bool  maskOutBoundDoorBellInterrupt(void);
  29. bool  enableOutBoundDoorBellInterrupt(void);
  30. /* I2O - Circular Queues handle Functions */
  31. /* initialization */
  32. bool  circularQueueEnable(CIRCULAR_QUEUE_SIZE cirQueSize,
  33.                           unsigned int queueBaseAddr);
  34. /* Inbound Post Queue */
  35. unsigned int    inBoundPostQueuePop(void);
  36. bool    isInBoundPostQueueInterruptSet(void);
  37. bool  clearInBoundPostQueueInterrupt(void);
  38. void    maskInBoundPostQueueInterrupt(void);
  39. void    enableInBoundPostQueueInterrupt(void);
  40. /* Outbound Post Queue */
  41. bool  outBoundPostQueuePush(unsigned int data);
  42. bool    isOutBoundPostQueueEmpty(void);
  43. /* Inbound Free Queue */
  44. bool  inBoundFreeQueuePush(unsigned int data);
  45. bool    isInBoundFreeQueueEmpty(void);
  46. /* Outbound Free Queue */
  47. unsigned int    outBoundFreeQueuePop(void);
  48. #endif  /* __INCi2oh */