⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ser_h8s_edosk2674.cdl

📁 ecos移植到R8H系列的源码。源码包来自http://www.cetoni.de/develop/develop_ecosh8s_en.html
💻 CDL
字号:
# ====================================================================
#
#      ser_h8s_edosk2674.cdl
#
#      eCos serial EDOSK2674 configuration data
#
# ====================================================================
#####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later version.
##
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
## for more details.
##
## You should have received a copy of the GNU General Public License along
## with eCos; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
##
## As a special exception, if other files instantiate templates or use macros
## or inline functions from this file, or you compile this file and link it
## with other works to produce a work based on this file, this file does not
## by itself cause the resulting work to be covered by the GNU General Public
## License. However the source code for this file must still be made available
## in accordance with section (3) of the GNU General Public License.
##
## This exception does not invalidate any other reasons why a work based on
## this file might be covered by the GNU General Public License.
##
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
## at http://sources.redhat.com/ecos/ecos-license/
## -------------------------------------------
#####ECOSGPLCOPYRIGHTEND####
# ====================================================================
######DESCRIPTIONBEGIN####
#
# Author(s):      jskov
# Contributors:
# Date:           1999-07-08
#
#####DESCRIPTIONEND####
#
# ====================================================================


cdl_package CYGPKG_IO_SERIAL_H8S_EDOSK2674 {
    display       "EDOSK-2674 serial device drivers"

    parent        CYGPKG_IO_SERIAL_DEVICES
    active_if     CYGPKG_IO_SERIAL
    active_if     CYGPKG_HAL_H8S_H8S2674_EDOSK2674

    requires      CYGPKG_ERROR
    include_dir   cyg/io

    description   "
           This option enables the serial device drivers for the
           EDOSK-2674 board, based on the generic H8S SCI driver."
           
    # FIXME: This really belongs in the H8S_SCI package    cdl_interface CYGINT_IO_SERIAL_H8S_SCI_REQUIRED {        display   "H8S SCI driver required"    } 

    define_proc {
        puts $::cdl_system_header "/***** serial driver proc output start *****/"
        puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_H8S_SCI_INL <cyg/io/h8s_h8s2674_edosk2674_sci.inl>"
        puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_H8S_SCI_CFG <pkgconf/io_serial_h8s_edosk2674.h>"
        puts $::cdl_system_header "/*****  serial driver proc output end  *****/"
    }

    cdl_component CYGPKG_IO_SERIAL_H8S_EDOSK2674_SERIAL2 {
        display       "SCI2 serial device driver"
        flavor        bool
        default_value 1
        description   "
            This option includes the serial device driver for the SCI 2
            port. The SCI 2 port is the only SCI port which is connected
            to a RS232 interface on the board."
            
       implements CYGINT_IO_SERIAL_H8S_SCI_REQUIRED 
                   
        cdl_option CYGDAT_IO_SERIAL_H8S_EDOSK2674_SERIAL2_NAME {
            display       "Device name"
            flavor        data
            default_value {"\"/dev/ser2\""}
            description   "
                This option specifies the device name for the SCI 2 port."
        }

        cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_BAUD {
            display       "Baud rate"
            flavor        data
            legal_values  { 4800 9600 14400 19200 38400 57600 115200 }
            default_value 9600
            description   "
                This option specifies the default baud rate (speed)
                for the SCI port 2. The EDOSK-2674 port is to slow for
                baudrates higher than 14400 baud when using interrupt 
                driven mode"
        }
        
        cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_INT_PRIO {
            display       "Interrupt priority"
            requires      CYGHWR_HAL_H8S_INT_CTRL_MODE_2
            active_if     CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_RX_INTDRV || CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_TX_INTDRV
            active_if     CYGHWR_HAL_H8S_INT_CTRL_MODE_2
            flavor        data
            legal_values  { 0 1 2 3 4 5 6 7 }
            default_value 7
            description   "
                This option specifies the priority of all SCI 2 interrupts 
                (ERI2, RXI2, TXI2, TEI2). The lowest priority is 0 and the highest 
                priority is 7. By default (reset) all H8S/2674 interrupt priorities
                are initialized to priority level 7"
        }
        
        cdl_component CYGPKG_IO_SERIAL_H8S_EDOSK2674_SERIAL2_RX {
            display       "RX options"
            flavor        none
            description   "
                SCI receiver specific options"
  
        
            cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_RX_INTDRV {
                display       "Receiver is interrupt driven"
                flavor        bool
                default_value 1
                requires      !CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT && !CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
                description   "
                    This option enables interrupt controlled receiver.
                    If this option is turned off only simple serial 
                    polling driver is available for receiver. The EDOSK board provides only one
                    serial channel. This channel is also used for debugging with GDB.
                    In order to use interrupts the CTRL C and break support for GDB 
                    have to be turned of because they use the same interrupt vector like
                    this serial driver"
             }

                
        
            cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_RX_BUFSIZE {
                display       "Buffer size for the receiver"
                active_if     CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_RX_INTDRV
                flavor        data
                legal_values  8 to 8192
                default_value 128
                description   "
                    This option specifies the size of the internal receive buffer
                    used for the SCI port 2."
            }
        }
        
        cdl_component CYGPKG_IO_SERIAL_H8S_EDOSK2674_SERIAL2_TX {
            display       "TX options"
            flavor        none
            description   "
                SCI transmitter specific options"
  
        
            cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_TX_INTDRV {
                display       "Transmitter is interrupt driven"
                flavor        bool
                default_value 1
                requires      !CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT && !CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
                description   "
                    This option enables interrupt controlled transmitter.
                    If this option is turned off only simple serial 
                    polling drivere is available for transmitter. The EDOSK board provides only one
                    serial channel. This channel is also used for debugging with GDB.
                    In order to use interrupts the CTRL C and break support for GDB 
                    have to be turned of because they use the same interrupt vector like
                    this serial driver"
             }

                
        
            cdl_option CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_TX_BUFSIZE {
                display       "Buffer size for the transmitter"
                active_if     CYGNUM_IO_SERIAL_H8S_EDOSK2674_SERIAL2_TX_INTDRV
                flavor        data
                legal_values  8 to 8192
                default_value 128
                description   "
                    This option specifies the size of the internal transmit buffer
                    used for the SCI port 2."
            }
        }
        
    }

    cdl_component CYGPKG_IO_SERIAL_H8S_EDOSK2674_TESTING {
        display    "Testing parameters"
        implements CYGINT_IO_SERIAL_TEST_SKIP_38400
        implements CYGINT_IO_SERIAL_TEST_SKIP_57600
        implements CYGINT_IO_SERIAL_TEST_SKIP_115200
        flavor     bool
        calculated 1
        no_define
        active_if  CYGPKG_IO_SERIAL_H8S_EDOSK2674_SERIAL2
        description   "
            This option defines various parameters required for running the
            serial tests."

        define_proc {
            puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"h8s-edosk2674\""
            puts $::cdl_header "#define CYGPRI_SER_TEST_SER_DEV  CYGDAT_IO_SERIAL_H8S_EDOSK2674_SERIAL2_NAME"
            puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV  \"/dev/tty2\""
        }
    }
}
# EOF ser_h8s_edosk2674.cdl

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -