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

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

?? sdc.c

?? Nucleus 移植到OMAP1610的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
                            _ppp_tx_dev_ptr_queue [_ppp_tx_dev_ptr_queue_write++] = device;

                            /* Activate the HISR that will take care of processing the
                               next packet in queue, if one is ready. */
                            NU_Activate_HISR (&PPP_TX_HISR);

                            /* Check for wrap of ring buffer. */
                
                            _ppp_tx_dev_ptr_queue_write %= PPP_MAX_TX_QUEUE_PTRS;

                       }
                    }
#endif /* PPP_POLLED_TX */
                }
#endif /* NU_ENABLE_PPP */
            }

            /* Get the interrupt status register value */
            int_status = SD_INBYTE(uart->base_address + IIR_OFFSET);
        }
        
        /**************** End Port Specific Section **************/
    
        /* No port is associated with the vector */
    }
    else 
    {
        ERC_System_Error(NU_UNHANDLED_INTERRUPT);
    }   
}

/****************************************************************************
* FUNCTION
*
*    SDC_Set_Baud_Rate
*
* DESCRIPTION
*
*    This function sets the UART buad rate.
*
* INPUTS
*
*    UINT32      :  The new baud rate.
*    SD_PORT *     :  Serial port to set the baud rate.
*
* OUTPUTS
*
*    none
*
****************************************************************************/
VOID  SDC_Set_Baud_Rate(UINT32 baud_rate, SD_PORT *uart)
{
    UNSIGNED    baud_div;
    UINT32      temp_long;

    /**************** Begin Port Specific Section **************/

    /* Set this bit to select the 6.5 divisor factor */
    SD_OUTBYTE (uart->base_address + OSC_12M_OFFSET, OSC_12M_SEL);

    /* Write to the divisor latch bit to enable the DLH and DLL registers */
    temp_long = SD_INBYTE(uart->base_address + LCR_OFFSET);
    SD_OUTBYTE (uart->base_address + LCR_OFFSET, LCR_DIV_EN);             

    /* Set the baud rate */
    baud_div = 115200 / uart->baud_rate;

    /* Put LSB in DLL Reg */
    SD_OUTBYTE (uart->base_address + DLL_OFFSET, baud_div);

    /* Put MSB in DLH Reg */    
    SD_OUTBYTE (uart->base_address + DLH_OFFSET, (baud_div >> 8));

    /* Disable the Divisor Latch bit */
    SD_OUTBYTE (uart->base_address + LCR_OFFSET, temp_long & ~LCR_DIV_EN);             
   /**************** End Port Specific Section ****************/

}
/****************************************************************************
* FUNCTION
*
*    SDC_Get_Char
*
* DESCRIPTION
*
*    This function reads the last received character from the UART.
*
* INPUTS
*
*    SD_PORT *      :   Serial port to get the char from.
*
* OUTPUTS
*
*    CHAR  :  Character read
*
****************************************************************************/
CHAR  SDC_Get_Char(SD_PORT *uart)
{
    CHAR    ch = NU_NULL;

#ifdef GRAFIX_MOUSE
    if ((uart->communication_mode == SERIAL_MODE) ||
        (uart->communication_mode == SERIAL_MOUSE))
#else
    if (uart->communication_mode == SERIAL_MODE)
#endif

    {
        if ((uart->rx_buffer_status == NU_BUFFER_FULL) ||
            (uart->rx_buffer_status == NU_BUFFER_DATA))
        {
            /* Store the character to be returned */
            ch = uart->rx_buffer[uart->rx_buffer_read++]; 

            /* If read pointer is at end, wrap it around */
            if (uart->rx_buffer_read == uart->sd_buffer_size)
                uart->rx_buffer_read = 0;

            /* Set the status to reflect removal of the character */
            if (uart->rx_buffer_write == uart->rx_buffer_read)
                uart->rx_buffer_status = NU_BUFFER_EMPTY;
            else
                uart->rx_buffer_status = NU_BUFFER_DATA;
        }

        return (ch);
    } /* endif mode */

#ifdef NU_ENABLE_PPP
    else if (uart->communication_mode == MDM_TERMINAL_COMMUNICATION || 
             uart->communication_mode == MDM_NETWORK_COMMUNICATION)

    /**************** Begin Port Specific Section **************/

             return ((UINT8)SD_INBYTE (uart->base_address + RHR_OFFSET));

    /**************** End Port Specific Section ****************/

#endif /* NU_ENABLE_PPP */

    /* Execution should never reach this point, this return was added
       in response to the 'implicit return' compiler warning */

    return (ch);
}

/****************************************************************************
* FUNCTION
*
*    SDC_Carrier
*
* DESCRIPTION
*
*    This function checks for a carrier.
*
* INPUTS
*
*    none
*
* OUTPUTS
*
*    STATUS    :  The status of the detection.
*
****************************************************************************/
STATUS SDC_Carrier(SD_PORT *uart)
{
    return (NU_TRUE);
}

/****************************************************************************
 Note: All functions below this point are generic and should not require
       any changes to support other UARTS.
 ****************************************************************************/

/****************************************************************************
* FUNCTION
*
*    SDC_Put_String
*
* DESCRIPTION
*
*    This writes a null-terminated string out to the serial port.
*
* INPUTS
*
*    CHAR *        :   String to be written to the serial port.
*    SD_PORT *     :   Serial port to send the string to.
*
* OUTPUTS
*
*    none
*
****************************************************************************/
VOID SDC_Put_String(CHAR *str, SD_PORT *uart)
{

   /* Grab the semaphore so that strings between threads
       do not get mixed. */
    if (NU_Obtain_Semaphore(uart->sd_semaphore, NU_SUSPEND) == NU_SUCCESS)
    {

        /* Send out the string. */
        for (; *str != 0; str++)
            SDC_Put_Char(*str, uart);

        /* Allow other threads to use this service. */
        NU_Release_Semaphore (uart->sd_semaphore);
    }

}


/****************************************************************************
* FUNCTION
*
*    SDC_Data_Ready
*
* DESCRIPTION
*
*    This function checks to see if there are any characters in the
*    receive buffer.  A status value is returned indicating whether
*    characters are present in the receive buffer.
*
* INPUTS
*
*    SD_PORT *      :   Serial port to check for data.
*
* OUTPUTS
*
*    STATUS                                The status indicates the
*                                          presence of characters.
*
****************************************************************************/
STATUS SDC_Data_Ready(SD_PORT *port)
{
    /* Check the status. */
    if((port->rx_buffer_status == NU_BUFFER_FULL) ||
       (port->rx_buffer_status == NU_BUFFER_DATA))

        return (NU_TRUE);

    else

        return (NU_FALSE);
}

/****************************************************************************
* FUNCTION
*
*    SDC_Change_Communication_Mode
*
* DESCRIPTION
*
*    This function switches the serial port between terminal mode and
*    network mode.  The mode affects how incoming characters are directed.
*
* INPUTS
*
*    INT      :  The mode of operation desired.
*
* OUTPUTS
*
*    none
*
****************************************************************************/
VOID SDC_Change_Communication_Mode(INT mode, SD_PORT *uart)
{
    uart->communication_mode = mode;

} /* SDC_Change_Communication_Mode */

/****************************************************************************
* FUNCTION
*
*    SDC_Reset
*
* DESCRIPTION
*
*    This function intializes the data variables associated with a UART
*
* INPUTS
*
*    SD_PORT      * :   Serial port to reset
*
* OUTPUTS
*
*    STATUS      :   Returns URT_SUCCESS if successful initialization,
*                    else a negative value is returned.
*
****************************************************************************/
VOID SDC_Reset (SD_PORT *uart)
{
    /* Ini the error counters */
    uart->frame_errors   = 0;
    uart->overrun_errors = 0;
    uart->parity_errors  = 0;
    uart->busy_errors    = 0;
    uart->general_errors = 0;
}

/***************************************************************************
* FUNCTION
*
*    URT_Init_Port
*
* DESCRIPTION
*
*    This function intializes the data variables associated with a UART
*
* INPUTS
*
*    SD_PORT      * :   Serial port to reset
*
* OUTPUTS
*
*    STATUS      :   Returns URT_SUCCESS if successful initialization,
*                    else a negative value is returned.
*
****************************************************************************/
#ifdef NU_ENABLE_PPP
STATUS  URT_Init_Port(DV_DEVICE_ENTRY *device)
{
    SD_PORT   *uart;
    STATUS    ret_status;

    /* Get a pointer to the UART layer of this device. */
    uart = &((PPP_LAYER *) device->ppp_layer)->uart;

    /* Init the serial port, copy init parameters from the device 
       structure. */
    uart->com_port              = device->dev_com_port;
    uart->baud_rate             = device->dev_baud_rate;
    uart->data_bits             = device->dev_data_bits;
    uart->stop_bits             = device->dev_stop_bits;
    uart->parity                = device->dev_parity;
    uart->data_mode             = device->dev_data_mode;
    uart->vector                = device->dev_vect;
    uart->driver_options        = device->dev_driver_options;
    uart->communication_mode    = MDM_TERMINAL_COMMUNICATION;
    uart->sd_buffer_size        = (2 * (PPP_MTU + PPP_FCS_SIZE + 
                                    PPP_MAX_PROTOCOL_SIZE + PPP_MAX_ADDR_CONTROL_SIZE));

    /* Init the port */
    ret_status = NU_SD_Init_Port (uart);

    if (ret_status == NU_SUCCESS)
    {
        /* Copy the vector back into the device entry just in case
           the UART driver changed it. */
        device->dev_vect = uart->vector;
    }

    return (ret_status);

}
#endif /* NU_ENABLE_PPP */



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产91热久久久做人人| 亚洲综合清纯丝袜自拍| 亚洲精品国产成人久久av盗摄| 午夜成人在线视频| aaa国产一区| 2020日本不卡一区二区视频| 亚洲电影视频在线| 成人sese在线| xf在线a精品一区二区视频网站| 亚洲自拍与偷拍| eeuss影院一区二区三区| 日韩欧美国产高清| 日韩和的一区二区| 欧美三级欧美一级| 亚洲精品伦理在线| 91麻豆123| 国产精品丝袜91| 久久精品国产一区二区三区免费看| 色老汉av一区二区三区| 亚洲三级视频在线观看| av高清不卡在线| 中文字幕日本乱码精品影院| 国产激情视频一区二区在线观看| 精品嫩草影院久久| 精品一区二区三区香蕉蜜桃| 欧美一级生活片| 日本美女视频一区二区| 7777精品伊人久久久大香线蕉的 | 一本色道**综合亚洲精品蜜桃冫| 欧美va亚洲va国产综合| 偷窥少妇高潮呻吟av久久免费| 色婷婷av一区二区三区大白胸| 中文字幕在线视频一区| 不卡视频免费播放| 亚洲欧美二区三区| 在线观看成人小视频| 亚洲一区在线观看视频| 欧美性猛交xxxxxxxx| 婷婷亚洲久悠悠色悠在线播放| 欧美日韩午夜在线视频| 日韩黄色在线观看| 26uuu国产日韩综合| 国产成人在线网站| 亚洲色图欧洲色图| 欧美日韩国产经典色站一区二区三区| 亚洲福利视频三区| 日韩三级中文字幕| 国产河南妇女毛片精品久久久 | 成人免费视频在线观看| 不卡电影免费在线播放一区| 一区二区三区四区不卡视频| 欧美老肥妇做.爰bbww视频| 美女诱惑一区二区| 久久久99精品免费观看| 91在线小视频| 日日欢夜夜爽一区| 国产欧美一区二区三区鸳鸯浴| 91色在线porny| 欧美aaaaaa午夜精品| 久久久影视传媒| 一本一道波多野结衣一区二区 | 性做久久久久久免费观看| 欧美一级在线观看| eeuss鲁片一区二区三区 | 亚洲影院理伦片| 欧美成人一区二区三区在线观看| 国产福利一区二区三区| 亚洲国产色一区| 国产欧美日韩综合精品一区二区| 在线观看不卡视频| 国产精品中文字幕欧美| 香蕉久久夜色精品国产使用方法 | 精品一区在线看| 亚洲精品老司机| 久久亚洲捆绑美女| 欧美日韩国产综合草草| 国产成人精品www牛牛影视| 亚洲一区二区三区小说| 国产欧美一区二区精品忘忧草| 91国偷自产一区二区三区成为亚洲经典 | 亚洲二区视频在线| 国产精品久久久久久久久快鸭| 欧美裸体bbwbbwbbw| 91视视频在线观看入口直接观看www| 日本中文字幕不卡| 亚洲黄色免费网站| 国产精品久久久久久久久免费相片 | 中文字幕亚洲在| 在线成人av影院| 色婷婷精品久久二区二区蜜臂av | 麻豆精品一区二区综合av| 亚洲美女屁股眼交| 中文字幕精品一区| 欧美成人aa大片| 91精品国产综合久久久蜜臀图片| 一本大道久久a久久综合婷婷| 国产精品一区三区| 国产美女久久久久| 久久99蜜桃精品| 日本亚洲免费观看| 亚洲福利视频一区二区| 亚洲精品水蜜桃| 亚洲天堂av老司机| 中文字幕一区二区三区蜜月| 国产三级精品视频| 久久综合九色综合97_久久久| 日韩一区二区高清| 日韩一级精品视频在线观看| 欧美一级日韩一级| 日韩欧美黄色影院| 欧美成人精品福利| 2020日本不卡一区二区视频| 久久午夜免费电影| 国产精品天干天干在观线| 久久久久88色偷偷免费| 国产精品色哟哟| 国产精品久久久久久久午夜片| 国产女主播视频一区二区| 国产视频在线观看一区二区三区| 久久精品夜色噜噜亚洲aⅴ| 久久久九九九九| 中文字幕在线视频一区| 亚洲日穴在线视频| 亚洲国产毛片aaaaa无费看| 亚洲va欧美va人人爽午夜| 99久久久久久| 在线精品国精品国产尤物884a| 在线观看日韩精品| 9191久久久久久久久久久| 日韩三级视频在线观看| 国产婷婷一区二区| 亚洲日本乱码在线观看| 三级精品在线观看| 国产美女精品在线| 91在线观看视频| 欧美精品一级二级三级| 久久这里只精品最新地址| 中文字幕av一区二区三区免费看| 亚洲欧美日本在线| 美女看a上一区| 成人h动漫精品一区二区| 欧美中文字幕一区二区三区| 日韩午夜三级在线| 国产精品你懂的在线欣赏| 亚洲电影你懂得| 精品一区二区三区免费毛片爱| 成人av网站在线| 91精品国产乱码久久蜜臀| 国产精品视频一二三| 午夜视频在线观看一区| 床上的激情91.| 67194成人在线观看| 国产精品婷婷午夜在线观看| 日韩激情视频网站| jlzzjlzz亚洲日本少妇| 欧美一区二区在线免费播放| 亚洲国产高清不卡| 免费av网站大全久久| 99久久精品免费看国产免费软件| 欧美一区二区三区的| 1区2区3区国产精品| 韩国欧美国产1区| 欧美日韩国产一二三| 亚洲欧洲精品天堂一级| 国产在线不卡视频| 欧美日韩情趣电影| 日韩美女啊v在线免费观看| 六月丁香综合在线视频| 欧美曰成人黄网| 中文字幕免费不卡| 国产在线观看一区二区| 在线不卡中文字幕| 99精品桃花视频在线观看| 日韩三级精品电影久久久| 亚洲成人综合视频| 波多野洁衣一区| 中文字幕av一区 二区| 久久99九九99精品| 欧美日韩国产天堂| 亚洲永久精品大片| 在线观看免费一区| 亚洲人亚洲人成电影网站色| 国产99一区视频免费| 久久免费视频色| 久久99国产精品久久99果冻传媒| 欧美久久一区二区| 午夜精品福利在线| 欧美区视频在线观看| 亚洲第一在线综合网站| 欧美在线免费观看亚洲| 一区二区三区欧美视频| 一本到高清视频免费精品| 亚洲欧美日韩国产一区二区三区| 成人v精品蜜桃久久一区| 国产日产欧产精品推荐色| 国产精品亚洲午夜一区二区三区| 久久精品视频在线免费观看 | gogo大胆日本视频一区| 中文av字幕一区| 99久久国产免费看|