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

📄 camcregacc.c

📁 OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI的双核处理器
💻 C
📖 第 1 页 / 共 5 页
字号:
UWORD32 CAMCCC_SYSCONFIGSoftResetRead32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetRead32);                /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Shift bitfield to align LSB with word LSB */                                 
    return(data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGSoftResetReadIsnormal_mode32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetReadIsnormal_mode32);   /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Shift bitfield to align LSB with word LSB */                                 
    return(CAMCCC_SYSCONFIGSoftResetnormal_mode==(CAMCCC_SYSCONFIGSoftResetE)data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGSoftResetReadIsrst_mode32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetReadIsrst_mode32);      /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Shift bitfield to align LSB with word LSB */                                 
    return(CAMCCC_SYSCONFIGSoftResetrst_mode==(CAMCCC_SYSCONFIGSoftResetE)data);
}


/********************************************************************/


UWORD32 CAMCCC_SYSCONFIGSoftResetGet32(const UWORD32 var)
{
    register UWORD32 data = var;                                                /* COPY from argument into data */                                              
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetGet32);                 /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Shift bitfield to align LSB with word LSB */                                 
    return((UWORD32)data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGSoftResetIsnormal_mode32(const UWORD32 var)
{
    register UWORD32 data = var;                                                /* COPY from argument into data */                                              
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetIsnormal_mode32);       /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Remove other bitfields. */                                                   
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Align bitfield LSB with word LSB */                                          
    return(CAMCCC_SYSCONFIGSoftResetnormal_mode==(CAMCCC_SYSCONFIGSoftResetE)data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGSoftResetIsrst_mode32(const UWORD32 var)
{
    register UWORD32 data = var;                                                /* COPY from argument into data */                                              
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetIsrst_mode32);          /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                                   /* Remove other bitfields. */                                                   
    data >>= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                /* Align bitfield LSB with word LSB */                                          
    return(CAMCCC_SYSCONFIGSoftResetrst_mode==(CAMCCC_SYSCONFIGSoftResetE)data);
}


/********************************************************************/


void CAMCCC_SYSCONFIGSoftResetWrite32(const UWORD32 baseAddress, const UWORD32 value)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    register UWORD32 newValue = value;                                          /* Copy 'value' into 'newValue' */                                              
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetWrite32);               /* Log the call to this function */                                             
    data &= ~(CAMC_CC_SYSCONFIG_SoftReset_MASK);                                /* Clear existing bitfield value */                                             
    newValue <<= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                            /* Shift new value into position */                                             
    newValue &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                               /* Remove other bitfield data which may be present */                           
    newValue |= data;                                                           /* Or-in new bitfield data */                                                   
    WR_MEM_32_VOLATILE(baseAddress+offset, newValue);                           /* Write value back to the register */                                          
}


/********************************************************************/


void CAMCCC_SYSCONFIGSoftResetWritenormal_mode32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    const UWORD32 newValue = (UWORD32)CAMCCC_SYSCONFIGSoftResetnormal_mode <<
                               CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                                                                              
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetWritenormal_mode32);    /* Log the call to this function */                                             
    data &= ~(CAMC_CC_SYSCONFIG_SoftReset_MASK);                                /* Clear the bitfield data */                                                   
    data |= newValue;                                                           /* Or-in new bitfield data */                                                   
    WR_MEM_32_VOLATILE(baseAddress+offset, data);                               /* Write value back to the register */                                          
}


/********************************************************************/


void CAMCCC_SYSCONFIGSoftResetWriterst_mode32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    const UWORD32 newValue = (UWORD32)CAMCCC_SYSCONFIGSoftResetrst_mode <<
                               CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                                                                                              
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetWriterst_mode32);       /* Log the call to this function */                                             
    data &= ~(CAMC_CC_SYSCONFIG_SoftReset_MASK);                                /* Clear the bitfield data */                                                   
    data |= newValue;                                                           /* Or-in new bitfield data */                                                   
    WR_MEM_32_VOLATILE(baseAddress+offset, data);                               /* Write value back to the register */                                          
}


/********************************************************************/


UWORD32 CAMCCC_SYSCONFIGSoftResetSet32(const UWORD32 var, const UWORD32 value)
{
    register UWORD32 data = var;                                                /* Copy from argument into data */                                              
    register UWORD32 newValue = value;                                          /* Copy 'value' into 'newValue' */                                              
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGSoftResetSet32);                 /* Log the call to this function */                                             
    data &= ~(CAMC_CC_SYSCONFIG_SoftReset_MASK);                                /* Clear existing bitfield value */                                             
    newValue <<= CAMC_CC_SYSCONFIG_SoftReset_OFFSET;                            /* Shift new value into position */                                             
    newValue &= CAMC_CC_SYSCONFIG_SoftReset_MASK;                               /* Remove other bitfield data which may be present */                           
    newValue |= data;                                                           /* Or-in new bitfield data */                                                   
    return((UWORD32)newValue);                                                                                                                                  
}


/********************************************************************/


UWORD32 CAMCCC_SYSCONFIGAutoIdleRead32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGAutoIdleRead32);                 /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_AutoIdle_MASK;                                    /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_AutoIdle_OFFSET;                                 /* Shift bitfield to align LSB with word LSB */                                 
    return(data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGAutoIdleReadIsclk_free32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGAutoIdleReadIsclk_free32);       /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_AutoIdle_MASK;                                    /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_AutoIdle_OFFSET;                                 /* Shift bitfield to align LSB with word LSB */                                 
    return(CAMCCC_SYSCONFIGAutoIdleclk_free==(CAMCCC_SYSCONFIGAutoIdleE)data);
}


/********************************************************************/


int CAMCCC_SYSCONFIGAutoIdleReadIsauto_clk_gate32(const UWORD32 baseAddress)
{
    const UWORD32 offset = CAMC_CC_SYSCONFIG_OFFSET;                            /* Register offset from the Base Address */                                     
    register UWORD32 data = RD_MEM_32_VOLATILE(baseAddress+offset);             /* Read the register */                                                         
    _DEBUG_LEVEL_1_EASI(EASIL1_CAMCCC_SYSCONFIGAutoIdleReadIsauto_clk_gate32);  /* Log the call to this function */                                             
    data &= CAMC_CC_SYSCONFIG_AutoIdle_MASK;                                    /* Mask off other bitfields. */                                                 
    data >>= CAMC_CC_SYSCONFIG_AutoIdle_OFFSET;                                 /* Shift bitfield to align LSB with word LSB */                                 
    return(CAMCCC_SYSCONFIGAutoIdleauto_clk_gate==(CAMCCC_SYSCONFIGAutoIdleE)data);
}

⌨️ 快捷键说明

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