亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vrc437x_serial.c

?? eCos操作系統源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
//==========================================================================////      io/serial/mips/vrc437x_serial.c////      Mips VRC437X Serial I/O Interface Module (interrupt driven)////==========================================================================//####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):    gthomas// Contributors: gthomas// Date:         1999-04-15// Purpose:      VRC437X Serial I/O module (interrupt driven version)// Description: ////####DESCRIPTIONEND####////==========================================================================#include <pkgconf/system.h>#include <pkgconf/io_serial.h>#include <pkgconf/io.h>#include <cyg/io/io.h>#include <cyg/hal/hal_intr.h>#include <cyg/io/devtab.h>#include <cyg/io/serial.h>#ifdef CYGPKG_IO_SERIAL_MIPS_VRC437X#include "vrc437x_serial.h"#if defined(CYGPKG_HAL_MIPS_LSBFIRST)#define VRC437X_SCC_BASE 0xC1000000#elif defined(CYGPKG_HAL_MIPS_MSBFIRST)#define VRC437X_SCC_BASE 0xC1000003#else#error MIPS endianness not defined by configuration#endif#define VRC437X_SCC_INT  CYGNUM_HAL_INTERRUPT_DUART#define SCC_CHANNEL_A             4#define SCC_CHANNEL_B             0extern void diag_printf(const char *fmt, ...);typedef struct vrc437x_serial_info {    CYG_ADDRWORD   base;    unsigned char  regs[16];   // Known register state (since hardware is write-only!)} vrc437x_serial_info;static bool vrc437x_serial_init(struct cyg_devtab_entry *tab);static bool vrc437x_serial_putc(serial_channel *chan, unsigned char c);static Cyg_ErrNo vrc437x_serial_lookup(struct cyg_devtab_entry **tab,                                        struct cyg_devtab_entry *sub_tab,                                       const char *name);static unsigned char vrc437x_serial_getc(serial_channel *chan);static Cyg_ErrNo vrc437x_serial_set_config(serial_channel *chan, cyg_uint32 key,                                           const void *xbuf, cyg_uint32 *len);static void vrc437x_serial_start_xmit(serial_channel *chan);static void vrc437x_serial_stop_xmit(serial_channel *chan);static cyg_uint32 vrc437x_serial_ISR(cyg_vector_t vector, cyg_addrword_t data);static void       vrc437x_serial_DSR(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);static SERIAL_FUNS(vrc437x_serial_funs,                    vrc437x_serial_putc,                    vrc437x_serial_getc,                   vrc437x_serial_set_config,                   vrc437x_serial_start_xmit,                   vrc437x_serial_stop_xmit    );#ifdef CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL0static vrc437x_serial_info vrc437x_serial_info0 = {VRC437X_SCC_BASE+SCC_CHANNEL_A};#if CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL0_BUFSIZE > 0static unsigned char vrc437x_serial_out_buf0[CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL0_BUFSIZE];static unsigned char vrc437x_serial_in_buf0[CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL0_BUFSIZE];static SERIAL_CHANNEL_USING_INTERRUPTS(vrc437x_serial_channel0,                                       vrc437x_serial_funs,                                        vrc437x_serial_info0,                                       CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL0_BAUD),                                       CYG_SERIAL_STOP_DEFAULT,                                       CYG_SERIAL_PARITY_DEFAULT,                                       CYG_SERIAL_WORD_LENGTH_DEFAULT,                                       CYG_SERIAL_FLAGS_DEFAULT,                                       &vrc437x_serial_out_buf0[0], sizeof(vrc437x_serial_out_buf0),                                       &vrc437x_serial_in_buf0[0], sizeof(vrc437x_serial_in_buf0)    );#elsestatic SERIAL_CHANNEL(vrc437x_serial_channel0,                      vrc437x_serial_funs,                       vrc437x_serial_info0,                      CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL0_BAUD),                      CYG_SERIAL_STOP_DEFAULT,                      CYG_SERIAL_PARITY_DEFAULT,                      CYG_SERIAL_WORD_LENGTH_DEFAULT,                      CYG_SERIAL_FLAGS_DEFAULT    );#endifDEVTAB_ENTRY(vrc437x_serial_io0,              CYGDAT_IO_SERIAL_MIPS_VRC437X_SERIAL0_NAME,             0,                     // Does not depend on a lower level interface             &cyg_io_serial_devio,              vrc437x_serial_init,              vrc437x_serial_lookup,     // Serial driver may need initializing             &vrc437x_serial_channel0    );#endif //  CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL0#ifdef CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL1static vrc437x_serial_info vrc437x_serial_info1 = {VRC437X_SCC_BASE+SCC_CHANNEL_B};#if CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL1_BUFSIZE > 0static unsigned char vrc437x_serial_out_buf1[CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL1_BUFSIZE];static unsigned char vrc437x_serial_in_buf1[CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL1_BUFSIZE];static SERIAL_CHANNEL_USING_INTERRUPTS(vrc437x_serial_channel1,                                       vrc437x_serial_funs,                                        vrc437x_serial_info1,                                       CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL1_BAUD),                                       CYG_SERIAL_STOP_DEFAULT,                                       CYG_SERIAL_PARITY_DEFAULT,                                       CYG_SERIAL_WORD_LENGTH_DEFAULT,                                       CYG_SERIAL_FLAGS_DEFAULT,                                       &vrc437x_serial_out_buf1[0], sizeof(vrc437x_serial_out_buf1),                                       &vrc437x_serial_in_buf1[0], sizeof(vrc437x_serial_in_buf1)    );#elsestatic SERIAL_CHANNEL(vrc437x_serial_channel1,                      vrc437x_serial_funs,                       vrc437x_serial_info1,                      CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_MIPS_VRC437X_SERIAL1_BAUD),                      CYG_SERIAL_STOP_DEFAULT,                      CYG_SERIAL_PARITY_DEFAULT,                      CYG_SERIAL_WORD_LENGTH_DEFAULT,                      CYG_SERIAL_FLAGS_DEFAULT    );#endifDEVTAB_ENTRY(vrc437x_serial_io1,              CYGDAT_IO_SERIAL_MIPS_VRC437X_SERIAL1_NAME,             0,                     // Does not depend on a lower level interface             &cyg_io_serial_devio,              vrc437x_serial_init,              vrc437x_serial_lookup,     // Serial driver may need initializing             &vrc437x_serial_channel1    );#endif //  CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL1static cyg_interrupt  vrc437x_serial_interrupt;static cyg_handle_t   vrc437x_serial_interrupt_handle;// Table which maps hardware channels (A,B) to software onesstruct serial_channel *vrc437x_chans[] = {#ifdef CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL0    // Hardware channel A    &vrc437x_serial_channel0,        #else    0,#endif#ifdef CYGPKG_IO_SERIAL_MIPS_VRC437X_SERIAL1    // Hardware channel B    &vrc437x_serial_channel1,#else    0,#endif};// Support functions which access the serial device.  Note that this chip requires// a substantial delay after each access. #define SCC_DELAY 100inline static voidscc_delay(void){    int i;    for (i = 0;  i < SCC_DELAY;  i++) ;}inline static voidscc_write_reg(volatile unsigned char *reg, unsigned char val){    scc_delay();    *reg = val;}inline static unsigned charscc_read_reg(volatile unsigned char *reg){    unsigned char val;    scc_delay();    val = *reg;    return (val);}inline static unsigned charscc_read_ctl(volatile struct serial_port *port, int reg){    if (reg != 0) {        scc_write_reg(&port->scc_ctl, reg);    }           return (scc_read_reg(&port->scc_ctl));}inline static voidscc_write_ctl(volatile struct serial_port *port, int reg, unsigned char val){    if (reg != 0) {        scc_write_reg(&port->scc_ctl, reg);    }           scc_write_reg(&port->scc_ctl, val);}inline static unsigned charscc_read_dat(volatile struct serial_port *port){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩和欧美的一区| 国产日韩欧美综合在线| 91久久一区二区| 99精品视频中文字幕| 国产a精品视频| jlzzjlzz欧美大全| 波多野结衣91| 91视频在线看| 色激情天天射综合网| 欧美日韩午夜精品| 91精品国产综合久久久久久| 欧美一区二区国产| 久久看人人爽人人| 亚洲国产精品精华液2区45| 国产精品久久三| 亚洲另类中文字| 日本美女一区二区三区| 国产呦萝稀缺另类资源| 国产成人精品亚洲777人妖| 北岛玲一区二区三区四区| 在线亚洲一区观看| 日韩一级二级三级精品视频| 久久综合色8888| 亚洲三级视频在线观看| 亚洲大型综合色站| 国产精品资源在线观看| 国产xxx精品视频大全| 色88888久久久久久影院按摩| 69堂精品视频| 亚洲国产精品成人久久综合一区| 亚洲免费观看高清完整版在线观看熊 | 天天做天天摸天天爽国产一区| 日本亚洲免费观看| 波波电影院一区二区三区| 91精品一区二区三区久久久久久| 日本一二三不卡| 日韩国产一二三区| www.爱久久.com| 精品日韩在线观看| 一区二区三区欧美日| 精品写真视频在线观看| 欧洲精品在线观看| 国产欧美日韩视频一区二区| 日本系列欧美系列| 91视频观看免费| 国产亚洲成av人在线观看导航| 一区二区三区av电影 | 国产精品久久久久久久久免费桃花 | av电影在线观看一区| 精品入口麻豆88视频| 亚洲一区欧美一区| 成人精品gif动图一区| 日韩三级中文字幕| 亚洲成人1区2区| 91网站视频在线观看| 国产午夜精品久久久久久免费视 | 国产欧美在线观看一区| 免费成人在线观看视频| 欧美视频日韩视频| 亚洲欧美aⅴ...| 不卡在线观看av| 久久久久久亚洲综合| 美女在线视频一区| 欧美一区二区三区色| 亚洲第一激情av| 欧美亚洲综合在线| 一区二区三区四区高清精品免费观看| 国产91露脸合集magnet| 国产亚洲美州欧州综合国| 狠狠色狠狠色综合系列| 欧美成人国产一区二区| 美腿丝袜亚洲色图| 欧美大片一区二区| 麻豆精品一区二区三区| 欧美精品日韩一区| 午夜av电影一区| 欧美日本在线观看| 亚洲成a人v欧美综合天堂| 在线观看成人小视频| 一区二区三区产品免费精品久久75| 99久久精品国产网站| 亚洲欧洲日韩一区二区三区| 一本一道波多野结衣一区二区 | 欧美精品第一页| 美脚の诱脚舐め脚责91| 久久午夜电影网| 波多野结衣的一区二区三区| 一区二区三区在线观看国产| 欧美四级电影在线观看| 日韩精品成人一区二区三区| 精品伦理精品一区| 北条麻妃一区二区三区| 亚洲成人免费视频| 精品国精品国产尤物美女| 成人午夜视频福利| 亚洲男同1069视频| 欧美精品视频www在线观看 | 欧美日韩亚洲国产综合| 另类小说欧美激情| 国产精品久久久久一区二区三区共| 91在线观看成人| 日韩不卡一区二区三区| 国产午夜久久久久| 色综合婷婷久久| 美国十次了思思久久精品导航| 亚洲国产精品v| 欧美日韩精品一区二区三区蜜桃| 久久国产精品99精品国产| 国产精品久久毛片a| 欧美日产在线观看| 成人毛片在线观看| 青青草原综合久久大伊人精品优势| 国产亚洲午夜高清国产拍精品| 91国产成人在线| 国模冰冰炮一区二区| 一区二区免费在线| 国产午夜精品久久| 日韩一区二区三区精品视频| 99天天综合性| 经典三级在线一区| 亚洲一本大道在线| 国产精品视频一二三区| 欧美一级午夜免费电影| 99精品国产视频| 国产成人在线视频免费播放| 日韩一区精品视频| 亚洲精品高清在线观看| 国产欧美日韩在线| 日韩欧美国产午夜精品| 欧美综合欧美视频| av电影天堂一区二区在线观看| 国产在线精品免费| 秋霞国产午夜精品免费视频| 一区二区三区在线观看视频| 国产欧美一区二区三区网站| 日韩免费视频一区二区| 欧美精品久久久久久久久老牛影院 | 久久亚洲一区二区三区四区| 欧美人妖巨大在线| 91麻豆自制传媒国产之光| 国产成人精品免费一区二区| 久久99久久99精品免视看婷婷| 亚洲成人动漫在线免费观看| 一区二区在线看| 亚洲人快播电影网| 国产精品久久看| 国产精品久久久久久久浪潮网站| 国产欧美一二三区| 欧美国产欧美综合| 中文字幕欧美区| 亚洲欧美怡红院| 亚洲欧美偷拍卡通变态| 亚洲视频在线观看三级| 亚洲欧美另类久久久精品| 亚洲私人黄色宅男| 亚洲第一av色| 日韩高清不卡一区二区| 日韩国产欧美视频| 裸体一区二区三区| 国产伦精品一区二区三区免费迷 | 青青草国产精品亚洲专区无| 日韩在线一区二区| 美女视频黄久久| 国产一区二区三区精品欧美日韩一区二区三区| 免播放器亚洲一区| 国产精品一级片| 一本久久精品一区二区| 日本久久精品电影| 欧美一级一区二区| 国产亚洲一二三区| 一区二区三区成人| 奇米精品一区二区三区在线观看| 精品一区二区三区免费视频| 国产经典欧美精品| 91成人国产精品| 精品欧美一区二区久久| 欧美高清一级片在线观看| 亚洲一区二区三区视频在线| 久久精品72免费观看| 国产成都精品91一区二区三| 91视频91自| 日韩精品中文字幕一区| 久久久久国产精品人| 亚洲乱码精品一二三四区日韩在线| 午夜精品久久久久影视| 国产一区二区三区蝌蚪| 在线观看视频一区二区欧美日韩| 4438x亚洲最大成人网| 国产精品天天看| 日韩黄色在线观看| 丰满白嫩尤物一区二区| 欧美一区二区播放| 最新高清无码专区| 韩国av一区二区三区| 在线区一区二视频| 国产农村妇女精品| 日韩精品乱码免费| 色婷婷综合久久久中文一区二区| 精品国产三级电影在线观看| 亚洲制服丝袜在线|