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

📄 hw_serial.h

📁 epson usb2.0 控制芯片 S1R72V05 固件程序。
💻 H
字号:
/*
 *  The above copyright holder, limited to cases in which one satisfies
 *  conditions (1) ~ (4) below, or the conditions described in Version 2
 *  of of the GNU Public License officially announced by the Free Software
 *  Foundation, consents to the use, reproduction, alteration, and
 *  redistribution (hereafter called utilization) of this software (this
 *  software includes alterations, likewise below) without compensation.
 *
 *  (1) When this software is utilized in the form of source code, the
 *  above copyright declaration, these conditions of utilization, and the
 *  following stipulation of no guarantee shall be included in unchanged
 *  form inside the source code.
 *  (2) When this software is redistributed in a form in which it can be
 *  used in the development of other software, library form, etc., the above
 *  copyright display, these terms of utilization, and the following
 *  stipulation of no guarantee shall be inserted in documentation accompanying
 *  redistribution (user's manual, etc.).
 *  (3) When this software is redistributed in a form in which it cannot be used
 *  in the development of other software, embedded in devices, etc., one of the
 *  following conditions shall be satisfied.
 *		(a) The above copyright display, these terms of utilization, and the
 *		following stipulation of no guarantee shall be inserted in documentation
 *		accompanying redistribution (user's manual, etc.).
 *		(b) The TOPPERS Project shall be notified owing to a method in which the
 *		form of distribution is decided otherwise.
 *		(4) The above copyright holder and the TOPPERS Project shall be exempt
 *		from responsibility for whatever damages occur either directly or indirectly
 *		through the utilization of this software.
 *
 *	This software is something that is provided with no guarantee. The above copyright
 *  holder and the TOPPERS Project make no guarantee whatsoever in regard to this
 *  software, including the possibility of its application. In addition, the above
 *  copyright holder and the TOPPERS Project shall also not bear responsibility for
 *  whatever damages occur either directly or indirectly through the utilization of
 *  this software.
 *
 *  @(#) $Id: hw_serial.h,v 1.2 2006/07/21 09:50:18 9564907 Exp $
 */

/*
  * Serial I/O device (SIO) driver(for Integrator)
 */

#ifndef _HW_SERIAL_H_
#define _HW_SERIAL_H_

/*
#include <integrator.h>
*/
#include <toya2.h>

/*
  * Vector number of interrupt handler of serial I/O
 */
#define INHNO_SIO  IRQ_UART1_BIT
#define INHNO_SIO2 IRQ_UART0_BIT

/*
  * Initialzation routine of SIO driver
 */
#define sio_initialize  uart_initialize

#ifndef _MACRO_ONLY

/*
  * Opening of serial I/O port
 */
Inline SIOPCB *
sio_opn_por(ID siopid, VP_INT exinf)
{
#if 0
    SIOPCB  *siopcb;
    BOOL    openflag;

    /*
     * Read whether there is an opening port in openflg.

     */
    openflag = uart_openflag();

    /*
     * Open processing of device dependence.
     */
    siopcb = uart_opn_por(siopid, exinf);


    /*
     * Setting related to interrupt
     */
    /* Enable Interrupt Rx */
    if(!openflag){
        sil_wrw_mem((VP)IRQ0_ENABLESET,IRQ_UART1);
    }

    return(siopcb);
#else
    return(0);
#endif
}

/*
  * Close serial I/O port
 */
Inline void
sio_cls_por(SIOPCB *siopcb)
{
#if 0
    /*
     * Close processing of device dependence
     */
    uart_cls_por(siopcb);

    /*
      * Mask the serial I/O interrupt
     */
    if (!uart_openflag) {
        /* Clear Rx Tx Pending bit */
        sil_wrw_mem((VP)IRQ0_ENABLECLR,(IRQ_UART1));
    }
#endif
}


/*
 * SIO interrupt handler
 */
#define sio_handler  uart_isr

/*
 * Character transmission to serial I/O port
 */
#define sio_snd_chr uart_snd_chr

/*
 * Character reception from serial I/O port
 */
#define sio_rcv_chr uart_rcv_chr

/*
 * Permission of callback from serial I/O port
 */
#define sio_ena_cbr uart_ena_cbr

/*
 * Prohibition of callback from serial I/O port
 */
#define sio_dis_cbr uart_dis_cbr

/*
 * Callback that can be transmitted from serial I/O port
 */
#define sio_ierdy_snd   uart_ierdy_snd

/*
 * Reception notification callback from serial I/O port
 */
#define sio_ierdy_rcv   uart_ierdy_rcv

#endif /* _MACRO_ONLY */
#endif /* _HW_SERIAL_H_ */

⌨️ 快捷键说明

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