#ifndef CYGONCE_DEVS_SERIAL_RS232_BAUD_H
#define CYGONCE_DEVS_SERIAL_RS232_BAUD_H

//==========================================================================
//
//	baud.h
//
//	Header file for the baud rate
//
//==========================================================================
//####COPYRIGHTBEGIN####
//
// -------------------------------------------
// The contents of this file are subject to the Cygnus eCos Public License
// Version 1.0 (the "License"); you may not use this file except in
// compliance with the License.  You may obtain a copy of the License at
// http://sourceware.cygnus.com/ecos
// 
// Software distributed under the License is distributed on an "AS IS"
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the
// License for the specific language governing rights and limitations under
// the License.
// 
// The Original Code is eCos - Embedded Cygnus Operating System, released
// September 30, 1998.
// 
// The Initial Developer of the Original Code is Cygnus.  Portions created
// by Cygnus are Copyright (C) 1998 Cygnus Solutions.  All Rights Reserved.
// -------------------------------------------
//
//####COPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): 	proven
// Contributors:	proven
// Date:	1998-05-22
// Purpose:	Define B0 and other macros
// Description:	This file contains a lot of macro stuff for the
//		baud rate, both internal only.
// Usage:	#include something that includes this.
//
//####DESCRIPTIONEND####
//
//==========================================================================

#ifdef CYG_DEVICE_INTERNAL

// Now set the default baudrate
#ifndef CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE
#error "Must specify a default baud rate"
#else

#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 0)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B0
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B0
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 50)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B50
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B50
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 75)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B75
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B75
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 110)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B110
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B110
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 134)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B134
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B134
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 150)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B150
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B150
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 200)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B200
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B200
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 200)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B200
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B200
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 300)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B300
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B300
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 600)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B600
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B600
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 1200)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B1200
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B1200
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 1800)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B1800
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B1800
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 2400)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B2400
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B2400
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 4800)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B4800
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B4800
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 9600)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B9600
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B9600
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 19200)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B19200
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B19200
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 38400)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B38400
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B38400
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 57600)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B57600
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B57600
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 115200)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B115200
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B115200
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 230400)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B230400
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B230400
#endif
#if (CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE == 460800)
#define CYG_DEVICE_SERIAL_RS232_T1_VALUE CYG_DEVICE_SERIAL_RS232_T1_VALUE_B460800
#define CYG_DEVICE_SERIAL_RS232_T2_VALUE CYG_DEVICE_SERIAL_RS232_T2_VALUE_B460800
#endif

#ifndef CYG_DEVICE_SERIAL_RS232_T1_VALUE
#error "Invalid default baud rate."
#endif

#endif // CYG_DEVICE_SERIAL_RS232_DEFAULT_BAUD_RATE

#endif // CYG_DEVICE_INTERNAL

#endif // CYGONCE_DEVS_SERIAL_RS232_BAUD_H
// End of baud.h

