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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? study_serial.c

?? 基于ARM S3C44B0X的ECOS 硬件移植代碼
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
//==========================================================================
//
//      io/serial/arm/study_serial.c
//
//      ARM AEB-2 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):    Lars.Lindqvist@combitechsystems.com
// Contributors: jlarmour
// Date:         2001-10-19
// Purpose:      ARM AEB-2 Serial I/O Interface Module (interrupt driven)
// 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>
#include <cyg/io/serialio.h>
#include <cyg/infra/diag.h>

#ifdef CYGPKG_IO_SERIAL_ARM_study

#include "study_serial.h"

typedef struct study_serial_info {
    CYG_ADDRWORD   base;
    CYG_WORD       tx_int_num;
    CYG_WORD       rx_int_num;
    cyg_interrupt  serial_tx_interrupt;
    cyg_interrupt  serial_rx_interrupt;
    cyg_handle_t   serial_tx_interrupt_handle;
    cyg_handle_t   serial_rx_interrupt_handle;
    bool           tx_enabled;
} study_serial_info;

static bool study_serial_init(struct cyg_devtab_entry *tab);
static bool study_serial_putc(serial_channel *chan, unsigned char c);
static Cyg_ErrNo study_serial_lookup(struct cyg_devtab_entry **tab, 
                                   struct cyg_devtab_entry *sub_tab,
                                   const char *name);
static unsigned char study_serial_getc(serial_channel *chan);
static Cyg_ErrNo study_serial_set_config(serial_channel *chan, 
                                       cyg_uint32 key,
                                       const void *xbuf, cyg_uint32 *len);
static void study_serial_start_xmit(serial_channel *chan);
static void study_serial_stop_xmit(serial_channel *chan);

static cyg_uint32 study_serial_tx_ISR(cyg_vector_t vector, cyg_addrword_t data);
static void       study_serial_tx_DSR(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);
static cyg_uint32 study_serial_rx_ISR(cyg_vector_t vector, cyg_addrword_t data);
static void       study_serial_rx_DSR(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data);

static SERIAL_FUNS(study_serial_funs, 
                   study_serial_putc, 
                   study_serial_getc,
                   study_serial_set_config,
                   study_serial_start_xmit,
                   study_serial_stop_xmit
    );

#ifdef CYGPKG_IO_SERIAL_ARM_study_SERIAL0
static study_serial_info study_serial_info0 = {0x01d00000, 
                                           CYGNUM_HAL_INTERRUPT_UART0_TX,
                                           CYGNUM_HAL_INTERRUPT_UART0_RX};
#if CYGNUM_IO_SERIAL_ARM_study_SERIAL0_BUFSIZE > 0
static unsigned char study_serial_out_buf0[CYGNUM_IO_SERIAL_ARM_study_SERIAL0_BUFSIZE];
static unsigned char study_serial_in_buf0[CYGNUM_IO_SERIAL_ARM_study_SERIAL0_BUFSIZE];

static SERIAL_CHANNEL_USING_INTERRUPTS(study_serial_channel0,
                                       study_serial_funs, 
                                       study_serial_info0,
                                       CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_study_SERIAL0_BAUD),
                                       CYG_SERIAL_STOP_DEFAULT,
                                       CYG_SERIAL_PARITY_DEFAULT,
                                       CYG_SERIAL_WORD_LENGTH_DEFAULT,
                                       CYG_SERIAL_FLAGS_DEFAULT,
                                       &study_serial_out_buf0[0], sizeof(study_serial_out_buf0),
                                       &study_serial_in_buf0[0], sizeof(study_serial_in_buf0)
    );
#else
static SERIAL_CHANNEL(study_serial_channel0,
                      study_serial_funs, 
                      study_serial_info0,
                      CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_study_SERIAL0_BAUD),
                      CYG_SERIAL_STOP_DEFAULT,
                      CYG_SERIAL_PARITY_DEFAULT,
                      CYG_SERIAL_WORD_LENGTH_DEFAULT,
                      CYG_SERIAL_FLAGS_DEFAULT
    );
#endif

DEVTAB_ENTRY(study_serial_io0, 
             CYGDAT_IO_SERIAL_ARM_study_SERIAL0_NAME,
             0,                     // Does not depend on a lower level interface
             &cyg_io_serial_devio, 
             study_serial_init, 
             study_serial_lookup,     // Serial driver may need initializing
             &study_serial_channel0
    );
#endif //  CYGPKG_IO_SERIAL_ARM_study_SERIAL0

#ifdef CYGPKG_IO_SERIAL_ARM_study_SERIAL1
static study_serial_info study_serial_info1 = {0x01d04000,
                                           CYGNUM_HAL_INTERRUPT_UART1_TX,
                                           CYGNUM_HAL_INTERRUPT_UART1_RX};
#if CYGNUM_IO_SERIAL_ARM_study_SERIAL1_BUFSIZE > 0
static unsigned char study_serial_out_buf1[CYGNUM_IO_SERIAL_ARM_study_SERIAL1_BUFSIZE];
static unsigned char study_serial_in_buf1[CYGNUM_IO_SERIAL_ARM_study_SERIAL1_BUFSIZE];

static SERIAL_CHANNEL_USING_INTERRUPTS(study_serial_channel1,
                                       study_serial_funs, 
                                       study_serial_info1,
                                       CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_study_SERIAL1_BAUD),
                                       CYG_SERIAL_STOP_DEFAULT,
                                       CYG_SERIAL_PARITY_DEFAULT,
                                       CYG_SERIAL_WORD_LENGTH_DEFAULT,
                                       CYG_SERIAL_FLAGS_DEFAULT,
                                       &study_serial_out_buf1[0], sizeof(study_serial_out_buf1),
                                       &study_serial_in_buf1[0], sizeof(study_serial_in_buf1)
    );
#else
static SERIAL_CHANNEL(study_serial_channel1,
                      study_serial_funs, 
                      study_serial_info1,
                      CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_ARM_study_SERIAL1_BAUD),
                      CYG_SERIAL_STOP_DEFAULT,
                      CYG_SERIAL_PARITY_DEFAULT,
                      CYG_SERIAL_WORD_LENGTH_DEFAULT,
                      CYG_SERIAL_FLAGS_DEFAULT
    );
#endif

DEVTAB_ENTRY(study_serial_io1, 
             CYGDAT_IO_SERIAL_ARM_study_SERIAL1_NAME,
             0,                     // Does not depend on a lower level interface
             &cyg_io_serial_devio, 
             study_serial_init, 
             study_serial_lookup,     // Serial driver may need initializing
             &study_serial_channel1
    );
#endif //  CYGPKG_IO_SERIAL_ARM_study_SERIAL1

// Internal function to actually configure the hardware to desired baud rate, etc.
static bool
study_serial_config_port(serial_channel *chan, cyg_serial_info_t *new_config, bool init)
{

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月天亚洲精品| 欧美国产一区在线| 日韩精品一区第一页| 欧美日韩国产片| 欧美aaaaa成人免费观看视频| 欧美一级xxx| 国产另类ts人妖一区二区| 欧美经典一区二区| 色综合天天综合网国产成人综合天| 成人免费小视频| 欧美日免费三级在线| 日韩综合在线视频| 91啪九色porn原创视频在线观看| 中文字幕在线播放不卡一区| 不卡欧美aaaaa| 亚洲欧美偷拍另类a∨色屁股| 99精品国产一区二区三区不卡| 中文字幕在线免费不卡| 91一区二区三区在线观看| 椎名由奈av一区二区三区| 色综合久久久久网| 亚洲色欲色欲www在线观看| 一本久久精品一区二区| 亚洲激情校园春色| 欧美美女喷水视频| 精品一区二区三区免费毛片爱| 亚洲精品在线观看视频| 国产成人免费在线观看不卡| 中文字幕在线观看一区二区| 91久久精品一区二区二区| 日韩av在线发布| 精品国免费一区二区三区| 成人午夜电影网站| 亚洲精品第一国产综合野| 在线亚洲高清视频| 肉丝袜脚交视频一区二区| 日本一区二区综合亚洲| 国产精品一区二区在线观看网站| 中文字幕av一区二区三区| 欧洲一区在线电影| 精品中文字幕一区二区| 亚洲国产精品成人综合色在线婷婷| 99re这里只有精品6| 热久久久久久久| 国产精品久久三区| 67194成人在线观看| 国产乱码精品一区二区三区忘忧草 | 九九在线精品视频| 1区2区3区欧美| 欧美一区二区三区思思人| 国产成人精品一区二| 亚洲一区二区三区视频在线播放 | 天天综合日日夜夜精品| 久久精品一区二区三区不卡牛牛 | a美女胸又www黄视频久久| 亚洲成av人片观看| 欧美激情综合五月色丁香| 欧美日韩亚洲高清一区二区| 国产原创一区二区| 亚洲国产一区二区在线播放| 在线精品国精品国产尤物884a| 激情欧美一区二区三区在线观看| 亚洲综合自拍偷拍| 国产无一区二区| 欧美精品粉嫩高潮一区二区| 97se亚洲国产综合在线| 国产一区二区三区在线观看免费| 亚洲一区二区成人在线观看| 国产丝袜欧美中文另类| 日韩一级欧美一级| 欧美影院精品一区| 99精品偷自拍| 国产精品一二二区| 麻豆精品一二三| 亚洲成人av免费| 亚洲精品亚洲人成人网| 国产精品国产a| 国产欧美日韩另类视频免费观看| 日韩欧美国产系列| 69堂亚洲精品首页| 欧美日韩国产美| 国产不卡一区视频| 蜜桃av一区二区三区电影| 婷婷久久综合九色综合绿巨人| 日韩久久一区二区| 日韩免费高清av| 精品欧美一区二区三区精品久久| 欧美猛男男办公室激情| 欧美精品乱码久久久久久| 在线观看视频一区二区欧美日韩| 91小视频在线免费看| 成人高清视频在线观看| 成人激情开心网| 国产综合久久久久久鬼色| 韩国欧美国产1区| 久久激情综合网| 久久国产尿小便嘘嘘| 国产综合一区二区| 国产精品综合久久| 国产高清无密码一区二区三区| 国产不卡视频在线播放| 处破女av一区二区| 99热99精品| 在线免费观看日本欧美| 欧美日韩中文字幕一区| 884aa四虎影成人精品一区| 欧美在线免费观看亚洲| 欧美亚洲综合色| 欧美一区二区三区四区五区| 2023国产精品自拍| 欧美激情一区在线观看| 亚洲天堂免费在线观看视频| 亚洲综合一区在线| 日韩av成人高清| 久久电影国产免费久久电影| 国产精一区二区三区| 不卡电影免费在线播放一区| 欧洲亚洲精品在线| 欧美精品一级二级三级| 日韩女优毛片在线| 国产精品丝袜黑色高跟| 亚洲最新视频在线观看| 欧美aaaaa成人免费观看视频| 蜜芽一区二区三区| 伦理电影国产精品| 91麻豆.com| 欧美精品久久久久久久多人混战 | 欧美在线观看视频一区二区三区| 欧美性淫爽ww久久久久无| 欧美电视剧在线看免费| 亚洲国产精品激情在线观看| 国产精品护士白丝一区av| 亚洲一级片在线观看| 亚洲在线观看免费视频| 国产成a人无v码亚洲福利| 在线观看区一区二| 欧美成人精品高清在线播放| 国产精品国产三级国产普通话蜜臀| 亚洲成人在线免费| 国产成人99久久亚洲综合精品| 欧洲在线/亚洲| 日韩欧美国产三级| 亚洲你懂的在线视频| 国内久久精品视频| 欧美午夜精品理论片a级按摩| 久久久影视传媒| 日日嗨av一区二区三区四区| 国产传媒日韩欧美成人| 欧美日韩中文字幕一区二区| 亚洲精品免费视频| 国产一区不卡视频| 777亚洲妇女| 亚洲欧美精品午睡沙发| 狠狠v欧美v日韩v亚洲ⅴ| 欧美性欧美巨大黑白大战| 日本一区二区三区免费乱视频| 午夜精品aaa| 91成人网在线| 亚洲国产成人午夜在线一区| 久久精品国产免费| 欧美天天综合网| 亚洲国产成人高清精品| bt7086福利一区国产| 国产日韩精品一区二区三区在线| 日本不卡123| 欧美性淫爽ww久久久久无| 亚洲日本中文字幕区| 粉嫩av亚洲一区二区图片| 久久尤物电影视频在线观看| 日韩精品福利网| 欧美视频精品在线观看| 亚洲黄色尤物视频| 91丨九色丨黑人外教| 精品国产一区二区在线观看| 最新不卡av在线| 欧洲一区在线电影| 亚洲男人天堂av| 色狠狠一区二区| 亚洲欧美国产三级| 成人激情动漫在线观看| 国产日韩欧美精品一区| 国产成人8x视频一区二区| 国产欧美日韩精品一区| 国产精品一二一区| 国产欧美日韩在线| 丁香激情综合国产| 国产精品亲子乱子伦xxxx裸| 国产麻豆视频一区| 久久婷婷色综合| 国产成人午夜99999| 国产精品视频一二三| 91性感美女视频| 一区av在线播放| 在线国产电影不卡| 亚洲国产cao| 日韩欧美美女一区二区三区| 国产精品77777| 久久久噜噜噜久久中文字幕色伊伊| 国产伦精品一区二区三区免费迷| 久久精品视频网|