www.pudn.com > 422.rar > constants.h
/* constants.h
* Header file for the Linux serial-bus driver.
* Written by wang song yue --bupt email:wsy5228@sina.com
* This software is released under the GPL-License.
* Version 0.1 28 oct 2005
*/
#ifdef __CONSTANTS_H__
#else
#define __CONSTANTS_H__
/* Device name as it will appear in /proc/devices */
#define DEVICE_NAME "tts"
/* Default driver major number, see /usr/src/linux/Documentation/devices.txt */
#define TTS_MAJOR 92
/* Timeout in jiffies before the system calls return with an error */
#define CANTIMEOUT (4*HZ)
/* Definition of the maximum number of concurrent supported hardware boards,
* chips per board, total number of chips, interrupts and message objects.
* Obviously there are no 32 different interrupts, but each chip can have its
* own interrupt so we have to check for it MAX_IRQ == MAX_TOT_CHIPS times.
*/
#define MAX_HW_CARDS 8
#define MAX_HW_CHIPS 4
#define MAX_TOT_CHIPS (MAX_HW_CHIPS*MAX_HW_CARDS)
#define MAX_IRQ 32
#define MAX_MSGOBJS 15
#define MAX_TOT_MSGOBJS (MAX_TOT_CHIPS*MAX_MSGOBJS)
#define MAX_BUF_LENGTH 64
#define IE (1<<1)
#define SIE (1<<2)
#define EIE (1<<3)
#define SPACING 0x3c0
/* These flags can be used for the msgobj_t structure flags data entry */
#define OPENED (1<<0)
/* These flags can be used for the chip_t structure flags data entry */
#define CONFIGURED (1<<0)
#define SEGMENTED (1<<1)
/* These flags can be used for the candevices_t structure flags data entry */
#define PROGRAMMABLE_IRQ (1<<0)
enum timing_BTR1 {
MAX_TSEG1 = 15,
MAX_TSEG2 = 7
};
/* Flags for baud_rate function */
#define BTR1_SAM (1<<1)
#endif