amd7930_fn.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* drivers/isdn/hisax/amd7930_fn.h
  2. *
  3. * gerdes_amd7930.h Header-file included by
  4. * gerdes_amd7930.c
  5. *
  6. * Author Christoph Ersfeld <info@formula-n.de>
  7. * Formula-n Europe AG (www.formula-n.com)
  8. * previously Gerdes AG
  9. *
  10. *
  11. * This file is (c) under GNU PUBLIC LICENSE
  12. */
  13. #define BYTE unsigned char
  14. #define WORD unsigned int
  15. #define rByteAMD(cs, reg) cs->readisac(cs, reg)
  16. #define wByteAMD(cs, reg, val) cs->writeisac(cs, reg, val)
  17. #define rWordAMD(cs, reg) ReadWordAmd7930(cs, reg)
  18. #define wWordAMD(cs, reg, val) WriteWordAmd7930(cs, reg, val)
  19. #define HIBYTE(w) ((unsigned char)((w & 0xff00) / 256))
  20. #define LOBYTE(w) ((unsigned char)(w & 0x00ff))
  21. #define AmdIrqOff(cs) cs->dc.amd7930.setIrqMask(cs, 0)
  22. #define AmdIrqOn(cs) cs->dc.amd7930.setIrqMask(cs, 1)
  23. #define AMD_CR 0x00
  24. #define AMD_DR 0x01
  25. #define DBUSY_TIMER_VALUE 80
  26. extern void Amd7930_interrupt(struct IsdnCardState *, unsigned char);
  27. extern void Amd7930_init(struct IsdnCardState *);
  28. extern void setup_Amd7930(struct IsdnCardState *);