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