ipoctal.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * ipoctal.h
  3. *
  4. * driver for the IPOCTAL boards
  5. * Copyright (C) 2009-2012 CERN (www.cern.ch)
  6. * Author: Nicolas Serafini, EIC2 SA
  7. * Author: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License as published by the Free
  11. * Software Foundation; version 2 of the License.
  12. */
  13. #ifndef _IPOCTAL_H_
  14. #define _IPOCTAL_H_
  15. #define NR_CHANNELS 8
  16. #define IPOCTAL_MAX_BOARDS 16
  17. #define MAX_DEVICES (NR_CHANNELS * IPOCTAL_MAX_BOARDS)
  18. #define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
  19. /**
  20. * struct ipoctal_stats -- Stats since last reset
  21. *
  22. * @tx: Number of transmitted bytes
  23. * @rx: Number of received bytes
  24. * @overrun: Number of overrun errors
  25. * @parity_err: Number of parity errors
  26. * @framing_err: Number of framing errors
  27. * @rcv_break: Number of break received
  28. */
  29. struct ipoctal_stats {
  30. unsigned long tx;
  31. unsigned long rx;
  32. unsigned long overrun_err;
  33. unsigned long parity_err;
  34. unsigned long framing_err;
  35. unsigned long rcv_break;
  36. };
  37. #endif /* _IPOCTAL_H_ */