OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [common/] [utils/] [cl_wbpex.cpp] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 22... Line 22...
//BRD_Handle g_hBrd=0;
//BRD_Handle g_hBrd=0;
 
 
//!  Инициализация модуля
//!  Инициализация модуля
U32  CL_WBPEX::init( void )
U32  CL_WBPEX::init( void )
{
{
    S32 err;
    //S32 err;
    S32 num;
    //S32 num;
 
 
    /*
    /*
    if( g_hBrd<=0)
    if( g_hBrd<=0)
    {
    {
        BRDC_fprintf( stderr, _BRDC("\r\nМодуль не найден\r\n") );
        BRDC_fprintf( stderr, _BRDC("\r\nМодуль не найден\r\n") );
Line 39... Line 39...
    */
    */
 
 
    board *brd = new pex_board();
    board *brd = new pex_board();
    m_pBoard = brd;
    m_pBoard = brd;
 
 
    brd->brd_open( "/dev/AMBPEX50" );
    brd->brd_open( "/dev/pexdrv0" );
    brd->brd_init();
    brd->brd_init();
    brd->brd_board_info();
    brd->brd_board_info();
    //brd->brd_pld_info();
    //brd->brd_pld_info();
 
 
    // сброс прошивки ПЛИС
    // сброс прошивки ПЛИС
Line 51... Line 51...
}
}
 
 
//!  Завершение работы с модулем
//!  Завершение работы с модулем
void  CL_WBPEX::cleanup( void )
void  CL_WBPEX::cleanup( void )
{
{
    S32 ret;
    //S32 ret;
    //ret=BRD_cleanup();
    //ret=BRD_cleanup();
 
 
}
}
 
 
 
 
Line 193... Line 193...
 
 
    StreamParam *pStrm= m_streamParam+strm;
    StreamParam *pStrm= m_streamParam+strm;
    if( pStrm->status!=1 )
    if( pStrm->status!=1 )
        return;
        return;
 
 
    S32 err;
    //S32 err;
    U32 val;
    //U32 val;
 
 
    //val=RegPeekInd( pStrm->trd, 0 );
    //val=RegPeekInd( pStrm->trd, 0 );
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_STOP, NULL);
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_STOP, NULL);
 
 
 
 
    pStrm->indexDma=-1;
    pStrm->indexDma=-1;
    pStrm->indexPc=-1;
    pStrm->indexPc=-1;
 
 
    val=pStrm->cycle; // 0 - однократный режим, 1 - циклический
    //val=pStrm->cycle; // 0 - однократный режим, 1 - циклический
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_START, &val );
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_START, &val );
}
}
 
 
void CL_WBPEX::StreamStop( U32 strm )
void CL_WBPEX::StreamStop( U32 strm )
{
{
    if( strm>1 )
    if( strm>1 )
        return;
        return;
 
 
    StreamParam *pStrm= m_streamParam+strm;
    //StreamParam *pStrm= m_streamParam+strm;
 
 
    S32 err;
    //S32 err;
 
 
    //RegPokeInd( pStrm->trd, 0, 2 );
    //RegPokeInd( pStrm->trd, 0, 2 );
 
 
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_STOP, NULL);
    //err = BRD_ctrl( pStrm->hStream, 0, BRDctrl_STREAM_CBUF_STOP, NULL);
 
 
Line 257... Line 257...
int CL_WBPEX::StreamGetIndexDma( U32 strm )
int CL_WBPEX::StreamGetIndexDma( U32 strm )
{
{
    if( strm>1 )
    if( strm>1 )
        return -1;
        return -1;
 
 
    StreamParam *pStrm= m_streamParam+strm;
    //StreamParam *pStrm= m_streamParam+strm;
 
 
 
 
 
 
//    int ret = pStrm->pStub->lastBlock;
//    int ret = pStrm->pStub->lastBlock;
    return 0;
    return 0;
Line 271... Line 271...
{
{
    if( strm>1 )
    if( strm>1 )
        return;
        return;
 
 
    StreamParam *pStrm= m_streamParam+strm;
    StreamParam *pStrm= m_streamParam+strm;
    S32 err;
    //S32 err;
    static U32 err_code=0;
    //static U32 err_code=0;
 
 
    if( pStrm->agree_mode )
    if( pStrm->agree_mode )
    {
    {
    }
    }
}
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.