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

📄 encregdrv3.c

📁 freescale i.mx31 BSP CE5.0全部源码
💻 C
📖 第 1 页 / 共 2 页
字号:
    val = EWL_ReadReg(0x48);
    val = (val & ~(mask_11b << 11)) | (mb_nr << 11);
    EWL_WriteReg(0x48, val);
}

/*******************************************************************************
 Function name   : GetEncChkP1MbNr
 Description     : Get the MB number for checkpoint 1
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP1MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x48);
    val = (mask_11b & (val >> 11));
    return val;
}

/*******************************************************************************
 Function name   : SetEncChkP2MbNr
 Description     : Set the MB number for checkpoint 2
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP2MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x48);
    val = (val & ~(mask_11b)) | (mb_nr);
    EWL_WriteReg(0x48, val);
}

/*******************************************************************************
 Function name   : GetEncChkP2MbNr
 Description     : Get the MB number for checkpoint 2
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP2MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x48);
    val = (mask_11b & (val));
    return val;
}

/******************************************************************************/
/********************** ENCODER REGISTER (BASE + 0x4C) ************************/
/******************************************************************************/

/*******************************************************************************
 Function name   : SetEncChkP3MbNr
 Description     : Set the MB number for checkpoint 3
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP3MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x4C);
    val = (val & ~(mask_11b << 11)) | (mb_nr << 11);
    EWL_WriteReg(0x4C, val);
}

/*******************************************************************************
 Function name   : GetEncChkP3MbNr
 Description     : Get the MB number for checkpoint 3
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP3MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x4C);
    val = (mask_11b & (val >> 11));
    return val;
}

/*******************************************************************************
 Function name   : SetEncChkP4MbNr
 Description     : Set the MB number for checkpoint 4
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP4MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x4C);
    val = (val & ~(mask_11b)) | (mb_nr);
    EWL_WriteReg(0x4C, val);
}

/*******************************************************************************
 Function name   : GetEncChkP4MbNr
 Description     : Get the MB number for checkpoint 4
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP4MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x4C);
    val = (mask_11b & (val));
    return val;
}

/******************************************************************************/
/********************** ENCODER REGISTER (BASE + 0x50) ************************/
/******************************************************************************/

/*******************************************************************************
 Function name   : SetEncChkP5MbNr
 Description     : Set the MB number for checkpoint 5
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP5MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x50);
    val = (val & ~(mask_11b << 11)) | (mb_nr << 11);
    EWL_WriteReg(0x50, val);
}

/*******************************************************************************
 Function name   : GetEncChkP5MbNr
 Description     : Get the MB number for checkpoint 5
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP5MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x50);
    val = (mask_11b & (val >> 11));
    return val;
}

/*******************************************************************************
 Function name   : SetEncChkP6MbNr
 Description     : Set the MB number for checkpoint 6
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP6MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x50);
    val = (val & ~(mask_11b)) | (mb_nr);
    EWL_WriteReg(0x50, val);
}

/*******************************************************************************
 Function name   : GetEncChkP6MbNr
 Description     : Get the MB number for checkpoint 6
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP6MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x50);
    val = (mask_11b & (val));
    return val;
}

/******************************************************************************/
/********************** ENCODER REGISTER (BASE + 0x54) ************************/
/******************************************************************************/

/*******************************************************************************
 Function name   : SetEncChkP7MbNr
 Description     : Set the MB number for checkpoint 7
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP7MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x54);
    val = (val & ~(mask_11b << 11)) | (mb_nr << 11);
    EWL_WriteReg(0x54, val);
}

/*******************************************************************************
 Function name   : GetEncChkP7MbNr
 Description     : Get the MB number for checkpoint 7
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP7MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x54);
    val = (mask_11b & (val >> 11));
    return val;
}

/*******************************************************************************
 Function name   : SetEncChkP8MbNr
 Description     : Set the MB number for checkpoint 8
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP8MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x54);
    val = (val & ~(mask_11b)) | (mb_nr);
    EWL_WriteReg(0x54, val);
}

/*******************************************************************************
 Function name   : GetEncChkP8MbNr
 Description     : Get the MB number for checkpoint 8
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP8MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x54);
    val = (mask_11b & (val));
    return val;
}

/******************************************************************************/
/********************** ENCODER REGISTER (BASE + 0x58) ************************/
/******************************************************************************/

/*******************************************************************************
 Function name   : SetEncChkP9MbNr
 Description     : Set the MB number for checkpoint 9
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP9MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x58);
    val = (val & ~(mask_11b << 11)) | (mb_nr << 11);
    EWL_WriteReg(0x58, val);
}

/*******************************************************************************
 Function name   : GetEncChkP9MbNr
 Description     : Get the MB number for checkpoint 9
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP9MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x58);
    val = (mask_11b & (val >> 11));
    return val;
}

/*******************************************************************************
 Function name   : SetEncChkP10MbNr
 Description     : Set the MB number for checkpoint 10
 Return type     : void
 Argument        : u32 mb_nr
*******************************************************************************/
void SetEncChkP10MbNr(u32 mb_nr)
{
    u32 val;

    ASSERT(mb_nr <= 1201);  /* 1201 => no checking */

    val = EWL_ReadReg(0x58);
    val = (val & ~(mask_11b)) | (mb_nr);
    EWL_WriteReg(0x58, val);
}

/*******************************************************************************
 Function name   : GetEncChkP10MbNr
 Description     : Get the MB number for checkpoint 10
 Return type     : u32 
*******************************************************************************/
u32 GetEncChkP10MbNr()
{
    u32 val;

    val = EWL_ReadReg(0x58);
    val = (mask_11b & (val));
    return val;
}

/*******************************************************************************
 Function name   : EncoderAsicReset
 Description     : Reset all ASIC registers to the deafult values
 Return type     : void 
*******************************************************************************/
void EncoderAsicReset()
{
    u32 i;

    SetEncEnable(0);    /*  disable ASIC first */
    for(i = 0x00; i < 0x84; i += 0x04)
        EWL_WriteReg(i, 0);
}

⌨️ 快捷键说明

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