本文整理汇总了C++中OUTREG32函数的典型用法代码示例。如果您正苦于以下问题:C++ OUTREG32函数的具体用法?C++ OUTREG32怎么用?C++ OUTREG32使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OUTREG32函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: codec_reg_write
////////////////////////////////////////////////////
// 功能: codec 寄存器写入
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
static void codec_reg_write(unsigned char addr, unsigned char data)
{
unsigned int temp;
temp = (addr << RGADW_ADDR_BIT) | (data << RGADW_DATA_BIT);
AIC_RW_CODEC_START();
OUTREG32(AIC_RGADW, temp);
OUTREG32(AIC_RGADW, (temp | AIC_RGADW_RGWR));
AIC_RW_CODEC_STOP();
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:19,代码来源:Device.c
示例2: TVC_ConfigSize
void TVC_ConfigSize(unsigned int src_width, unsigned int src_height, unsigned int tar_width, unsigned int tar_height)
{
_SIZE tarSize = {0};
TV_INFO("src %d, %d, tar %d, %d\n", src_width, src_height, tar_width, tar_height);
//src size
if (_tvcContext.srcSize.width != src_width ||
_tvcContext.srcSize.height != src_height)
{
_tvcContext.srcSize.width = src_width;
_tvcContext.srcSize.height = src_height;
_tvcContext.srcFormatSizeDirty = TRUE;
}
// Config Source Size
OUTREG32(&TVC_REG->SRC_WIDTH, _tvcContext.srcSize.width);
OUTREG32(&TVC_REG->SRC_HEIGHT, _tvcContext.srcSize.height);
// Config Line Pitch
{
TVC_REG_LINE_OFFSET OFFSET = TVC_REG->LINE_OFFSET;
OFFSET.LINE_OFFSET = (TVC_YUV420_BLK == _tvcContext.srcFormat ||
TVC_YUV420_PLANAR == _tvcContext.srcFormat) ?
(_tvcContext.srcSize.width * 1) :
(_tvcContext.srcSize.width * 2);
OUTREG32(&TVC_REG->LINE_OFFSET, AS_UINT32(&OFFSET));
}
//tar size
tarSize.width = tar_width;
tarSize.height = tar_height;
_SetTarSize(tar_width, tar_height);
_tvcContext.tarSize = tarSize;
_SetResizCoeff(_tvcContext.srcSize, tarSize);
_ConfigFullDisplayRegion();
{
TVC_REG_UPDATE update = TVC_REG->REG_UPDATE;
update.REG_RDY = 1;
OUTREG32(&TVC_REG->REG_UPDATE, AS_UINT32(&update));
}
}
开发者ID:Lesozav25,项目名称:ZOPO-TSN,代码行数:52,代码来源:tvc_drv.c
示例3: Init_PerformanceCounter
int Init_PerformanceCounter(void)
{
CLRREG32(A_CPM_CLKGR, CLKGR_STOP_TCU);
OUTREG16(A_TCU_TECR, TCU_OSTCL);
OUTREG32(A_OST_CSR, TCU_CLK_EXTAL | TCU_CLK_PRESCALE_CLK4);
OUTREG32(A_OST_DR, 0xFFFFFFFF);
OUTREG32(A_OST_CNT, 0);
SETREG32(A_TCU_TESR, TCU_OSTEN);
return ((OSC_CLOCK / 4 ) / 1000000);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:13,代码来源:timer.c
示例4: JZ_InitIdleTimer
void JZ_InitIdleTimer(void (*handler)(unsigned int))
{
while(IdleTimer_Flag);
CLRREG32(A_CPM_CLKGR, CLKGR_STOP_TCU);
OUTREG16(A_TCU_TECR, TCU_TIMER(TCU_IDLE_TIMER_CHN));
OUTREG16(A_TCU_TCSR(TCU_IDLE_TIMER_CHN), TCU_CLK_EXTAL | TCU_CLK_PRESCALE_CLK256);
OUTREG16(A_TCU_TDFR(TCU_IDLE_TIMER_CHN), 0xffff);
OUTREG16(A_TCU_TDHR(TCU_IDLE_TIMER_CHN), 0xffff);
OUTREG16(A_TCU_TCNT(TCU_IDLE_TIMER_CHN), 0x0000);
OUTREG32(A_TCU_TFCR, TCU_INTR_FLAG(TCU_IDLE_TIMER_CHN));
OUTREG32(A_TCU_TMCR, TCU_INTR_FLAG(TCU_IDLE_TIMER_CHN));
request_irq(EIRQ_TCU2_BASE + TCU_IDLE_TIMER_CHN, handler, 0);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:13,代码来源:timer.c
示例5: DPI1_EnableClk
DPI_STATUS DPI1_EnableClk()
{
DPI_REG_EN en = DPI1_REG->DPI_EN;
en.EN = 1;
OUTREG32(&DPI1_REG->DPI_EN, AS_UINT32(&en));
//release mutex0
//#ifndef BUILD_UBOOT
#if 0
OUTREG32(DISP_MUTEX_BASE + 0x24, 0);
while((INREG32(DISP_MUTEX_BASE + 0x24)&0x02)!=0){} // polling until mutex lock complete
#endif
return DPI_STATUS_OK;
}
开发者ID:JustAndroids,项目名称:ZTEBladeL2,代码行数:13,代码来源:dpi1_drv.c
示例6: DPI_ConfigHsync
DPI_STATUS DPI_ConfigHsync(DPI_POLARITY polarity, UINT32 pulseWidth, UINT32 backPorch,
UINT32 frontPorch)
{
DPI_REG_TGEN_HPORCH hporch = DPI_REG->TGEN_HPORCH;
hporch.HBP = backPorch;
hporch.HFP = frontPorch;
OUTREG32(&DPI_REG->TGEN_HWIDTH, AS_UINT32(&pulseWidth));
OUTREG32(&DPI_REG->TGEN_HPORCH, AS_UINT32(&hporch));
return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:13,代码来源:dpi_drv.c
示例7: DPI_ConfigVsync
DPI_STATUS DPI_ConfigVsync(DPI_POLARITY polarity, UINT32 pulseWidth, UINT32 backPorch,
UINT32 frontPorch)
{
DPI_REG_TGEN_VPORCH vporch = DPI_REG->TGEN_VPORCH;
vporch.VBP = backPorch;
vporch.VFP = frontPorch;
OUTREG32(&DPI_REG->TGEN_VWIDTH, AS_UINT32(&pulseWidth));
OUTREG32(&DPI_REG->TGEN_VPORCH, AS_UINT32(&vporch));
return DPI_STATUS_OK;
}
开发者ID:LosTigeros,项目名称:Trooper2_4.0_5.0_kernel,代码行数:13,代码来源:dpi_drv.c
示例8: dma_nowait_cpyinit
void dma_nowait_cpyinit()
{
CLRREG32(A_CPM_CLKGR, ( 1 << 12 ));
SETREG32(A_DMA_DMAC(DMA_CPY_CHANNEL / 6),DMAC_DMA_EN);
OUTREG32(A_DMA_DCKE(DMA_CPY_CHANNEL / 6),(1 << (DMA_CPY_CHANNEL % 6)));//Open channel clock
CLRREG32(A_DMA_DMAC(DMA_CPY_CHANNEL / 6), (DMAC_HALT | DMAC_ADDR_ERR));//Ensure DMAC.AR = 0,DMAC.HLT = 0
CLRREG32(A_DMA_DCS(DMA_CPY_CHANNEL), DCS_AR | DCS_HLT | DCS_TT | DCS_INV); // Ensure DCSn.AR = 0, DCSn.HLT = 0, DCSn.TT = 0, DCSn.INV = 0
OUTREG32(A_DMA_DTC(DMA_CPY_CHANNEL), 0);//DTCn = 0
CLRREG32(A_DMA_DCS(DMA_CPY_CHANNEL), DCS_CTE);
SETREG32(A_DMA_DCS(DMA_CPY_CHANNEL), DCS_NDES);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:13,代码来源:dmaunit.c
示例9: gpio_intr_init
unsigned int gpio_intr_init(GPIO_INTR_TRIGGER_TYPE gitt, unsigned int pin)
{
unsigned int base, bit;
if ((pin < NUM_GPIO) && (gitt < GITT_MAX))
{
base = GPIO_BASE_U_VIRTUAL + pin / 32 * 0x100;
bit = 1 << (pin % 32);
OUTREG32(base + GPIO_PXPIN_OFFSET, bit);
if ((gitt == GITT_F_EDGE) || (gitt == GITT_R_EDGE))
OUTREG32(base + GPIO_PXTRGS_OFFSET, bit); // Edge Trigger
else
OUTREG32(base + GPIO_PXTRGC_OFFSET, bit); // Level Trigger
OUTREG32(base + GPIO_PXFUNC_OFFSET, bit);
OUTREG32(base + GPIO_PXSELS_OFFSET, bit);
if ((gitt == GITT_R_EDGE) || (gitt == GITT_H_LEVEL))
OUTREG32(base + GPIO_PXDIRS_OFFSET, bit); // Rising Edge or High Level
else
OUTREG32(base + GPIO_PXDIRC_OFFSET, bit); // Falling Edge or Low Level
OUTREG32(base + GPIO_PXFLGC_OFFSET, bit);
return (1);
}
else
return (0);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:30,代码来源:gpio.c
示例10: dma_copy_nowait
void dma_copy_nowait(void *tar,void *src,int size)
{
int timeout = 0x1000000;
while ((!(INREG32(A_DMA_DCS(DMA_CPY_CHANNEL)) & DCS_TT)) && (timeout--));
CLRREG32(A_DMA_DCS(DMA_CPY_CHANNEL), DCS_CTE);
OUTREG32(A_DMA_DSA(DMA_CPY_CHANNEL), PHYSADDR((unsigned long)src));
OUTREG32(A_DMA_DTA(DMA_CPY_CHANNEL), PHYSADDR((unsigned long)tar));
OUTREG32(A_DMA_DTC(DMA_CPY_CHANNEL), size / 32);
OUTREG32(A_DMA_DRT(DMA_CPY_CHANNEL), DRT_AUTO);
OUTREG32(A_DMA_DCM(DMA_CPY_CHANNEL), (DCM_SAI| DCM_DAI | DCM_SP_32BIT | DCM_DP_32BIT | DCM_TSZ_32BYTE));
CLRREG32(A_DMA_DCS(DMA_CPY_CHANNEL),(DCS_TT));
SETREG32(A_DMA_DCS(DMA_CPY_CHANNEL), DCS_CTE | DCS_NDES);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:14,代码来源:dmaunit.c
示例11: pwm_set_duty
void pwm_set_duty(unsigned int chn, unsigned int percent)
{
unsigned int full_cycles;
static unsigned int old_percent=1;
if (percent == 108)
{
OUTREG16(A_TCU_TESR, TCU_TIMER(chn));
SETREG32((A_TCU_TCSR(chn)), TCSR_PWM_EN);
OUTREG32(A_TCU_TMSR, TCU_INTR_FLAG(chn));
return;
}
if (percent > 100)
{
printf("The percent of PWM should be within 100\n");
return;
}
if (percent == 0)
{
CLRREG32((A_TCU_TCSR(chn)), TCSR_PWM_EN);
OUTREG32(A_TCU_TMSR, TCU_INTR_FLAG(chn));
OUTREG16(A_TCU_TECR, TCU_TIMER(chn));
if(old_percent!=0)
{
__gpio_as_output(4*32+20+chn);
__gpio_clear_pin(4*32+20+chn);
}
old_percent=0;
}
else
{
if(old_percent==0)
{
OUTREG32(A_GPIO_PXFUNS(4), 1 << (20 + chn));
OUTREG32(A_GPIO_PXSELC(4), 1 << (20 + chn));
OUTREG32(A_GPIO_PXPES(4), 1 << (20 + chn));
}
full_cycles = INREG16(A_TCU_TDFR(chn));
CLRREG32((A_TCU_TCSR(chn)), TCSR_PWM_EN);
OUTREG16(A_TCU_TDHR(chn), full_cycles - (full_cycles * percent) / 110);
OUTREG16(A_TCU_TCNT(chn), 0x0000);
OUTREG16(A_TCU_TESR, TCU_TIMER(chn));
SETREG32((A_TCU_TCSR(chn)), TCSR_PWM_EN);
old_percent=percent;
}
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:50,代码来源:timer.c
示例12: ConfigureNextProfilerCount
//------------------------------------------------------------------------------
//
// Function: ConfigureNextProfilerCount
//
// Updates the profiler count (prepares the timer for the next timer event).
//
static void ConfigureNextProfilerCount(DWORD dwCountInterval)
{
DWORD dwTimerTemp;
if (!g_pProfilerISR) return;
// Change number of timer ticks in the period.
//
OUTREG32(&g_pPWMRegs->TCNTB2, dwCountInterval);
dwTimerTemp = INREG32(&g_pPWMRegs->TCON) & (~(0xf << 12));
OUTREG32(&g_pPWMRegs->TCON, dwTimerTemp | (2 << 12)); // Update TCVNTB2 and stop.
OUTREG32(&g_pPWMRegs->TCON, dwTimerTemp | (1 << 12)); // One-shot mode and start.
}
开发者ID:blackfa1con,项目名称:openembed,代码行数:21,代码来源:profiler.c
示例13: dma_start
////////////////////////////////////////////////////
// 功能: 延迟N个豪秒
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
static void dma_start(unsigned int channel, unsigned int srcAddr, unsigned int dstAddr, unsigned int count, unsigned char mode)
{
#ifdef KPRINTF_DEF
kprintf("dma channle = %d\n",channel);
kprintf("source = %x, destion = %x, count = %x\n",srcAddr,dstAddr,count*16);
#endif
OUTREG32(A_DMA_DSA(channel), srcAddr); // DMA数据地址
OUTREG32(A_DMA_DTA(channel), dstAddr); // DMA目标地址
OUTREG32(A_DMA_DTC(channel), count / 16); // 传送DMA的数据组数,当前设置1组为16个数据
SETREG32(A_DMA_DCS(channel), DCS_CTE); // 开始DMA数据传送
//判断是否允许DMA中断
if( mode )
InterruptUnmask(IRQ_DMA_0 + channel, 0); // 允许DMA结束后,自动产生中断
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:22,代码来源:Device.c
示例14: OTGDevice_InitCore
//////////
// Function Name : OTGDevice_InitCore
// Function Desctiption : This function initializes OTG Link Core.
// Input : NONE
// Output : NONE
// Version :
void OTGDevice_InitCore(void)
{
OUTREG32(GAHBCFG, MODE_SLAVE|BURST_SINGLE|GBL_INT_UNMASK);
OUTREG32(GUSBCFG, 0<<15 // PHY Low Power Clock sel
|1<<14 // Non-Periodic TxFIFO Rewind Enable
|0x5<<10 // Turnaround time
|0<<9|0<<8 // [0:HNP disable, 1:HNP enable][ 0:SRP disable, 1:SRP enable] H1= 1,1
|0<<7 // Ulpi DDR sel
|0<<6 // 0: high speed utmi+, 1: full speed serial
|0<<4 // 0: utmi+, 1:ulpi
|1<<3 // phy i/f 0:8bit, 1:16bit
|0x7<<0 // HS/FS Timeout*
);
}
开发者ID:HITEG,项目名称:TenByTen6410_SLC,代码行数:21,代码来源:otgdev.c
示例15: LcdPdd_LCD_Initialize
void LcdPdd_LCD_Initialize(void){
unsigned int val = 0;
val = INREG32(0x4a009120);//CM_DSS_DSS_CLKCTRL
val = val & ~(0x0502);
// Setup the DSS1 clock divider - disable DSS1 clock, change divider, enable DSS clock
OUTREG32(0x4a009120, val);//CM_DSS_DSS_CLKCTRL
udelay(10000);
SETREG32(0x4a00815c, 8<<0);//CM_DIV_M5_DPLL_PER
udelay(10000);
//printf("CM_CLKSEL_DSS= %x\n",INREG32(CM_CLKSEL_DSS));
val = INREG32(0x4a009120) ;//CM_DSS_DSS_CLKCTRL
val = val | 0x0502;
OUTREG32(0x4a009120, 0x00000502);
udelay(10000);
// LCD control xxxx xxxx xxxx 0000 0000 0010 0000 1001
OUTREG32(0x48041238, DISPC_CONTROL_TFTDATALINES_24 | DISPC_CONTROL_STNTFT);//DISPC_CONTROL2
// Default Color
OUTREG32(0x480413ac, 0x00000000);//DISPC_DEFAULT_COLOR2
// LCD control xxxx xxxx xxxx 0000 0000 0010 0000 1001
SETREG32(0x48041238, 0<<12);//DISPC_CONTROL2 OVERLAYOPTIMIZATION
// Default Transparency Color
OUTREG32(0x480413b0, 0);//DISPC_TRANS_COLOR2
SETREG32(0x48041044, 0x4<<0);//DISPC_CONFIG1 LOAD_MODE: Frame data only loaded every frame
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Signal configuration
// OUTREG32(0x48041408,DISPC_POL_FREQ_ONOFF);//DISPC_POL_FREQ2
OUTREG32(0x48041408,0x00003000);//DISPC_POL_FREQ2
udelay(10000);
// Configure the divisor
OUTREG32(0x4804140c,DISPC_DIVISOR_R(LCD_PIXCLKDIV,LCD_LOGCLKDIV));//DISPC_DIVISOR2 (PCD 4,LCD 1)
// Configure the panel size
OUTREG32(0x480413cc,DISPC_SIZE_LCD_R(LCD_HEIGHT,LCD_WIDTH));//DISPC_SIZE_LCD2 (1024,600)
// Timing logic for HSYNC signal
OUTREG32(0x48041400,DISPC_TIMING(LCD_HSW-1,LCD_HFP-1,LCD_HBP-1));//DISPC_TIMING_H2
// Timing logic for VSYNC signal
OUTREG32(0x48041404,DISPC_TIMING(LCD_VSW-1,LCD_VFP,LCD_VBP));//DISPC_TIMING_V2
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
开发者ID:ithryn,项目名称:FIREFIREFIRE-Multiboot-PoC,代码行数:48,代码来源:omap4_lcd.c
示例16: idle_timerhandle
static void idle_timerhandle(unsigned int arg)
{
OUTREG32(A_TCU_TFCR, TCU_INTR_FLAG(TCU_IDLE_TIMER_CHN));
JZ_StopTimerEx(TCU_IDLE_TIMER_CHN);
IdleTimer_Flag=0;
free_irq(EIRQ_TCU2_BASE + TCU_IDLE_TIMER_CHN);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:7,代码来源:timer.c
示例17: StopAssistTimer
//----------------------------------------------------------------------------
void StopAssistTimer()
{
OUTREG16(A_TCU_TECR, TCU_TIMER(TCU_IDLE_TIMER_CHN));
OUTREG32(A_TCU_TMSR, TCU_INTR_FLAG(TCU_IDLE_TIMER_CHN));
OUTREG16(A_TCU_TCNT(TCU_IDLE_TIMER_CHN), 0x0000);
free_irq(EIRQ_TCU2_BASE + TCU_IDLE_TIMER_CHN);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:8,代码来源:timer.c
示例18: CloseMediaDevice
////////////////////////////////////////////////////
// 功能: 关闭声音设备
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
void CloseMediaDevice(char channel)
{
int arg;
int time;
arg = ((channel == 0) ? RECORD_CHANNEL : PLAYBACK_CHANNEL );
//等待DMA结束
time = 0;
while( INREG32(A_DMA_DTC(arg)) )
{
#ifdef KPRINTF_DEF
kprintf("close media device : count = %x\n",INREG32(A_DMA_DTC(arg)));
#endif
sTimerSleep(10, NULL);
//加入延迟处理,防止死锁
time++;
if( time > 10 )
{
kdebug(mod_media, PRINT_WARNING, "close media device timer out\n");
break;
}
}
//stop dma
CLRREG32(A_DMA_DCS(arg), DCS_AR | DCS_HLT | DCS_CTE | DCS_CT);
//close aic
CLRREG32(AIC_CR, AIC_CR_ERPL);
SETREG32(AIC_CR, AIC_CR_FLUSH_FIFO);
OUTREG32(AIC_SR, 0x00000000);
#ifndef CODEC_ALWAYS_OPEN
CloseMediaCodecDevice();
#endif
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:42,代码来源:Device.c
示例19: jz_audio_reset
////////////////////////////////////////////////////
// 功能: 音频初始化
// 输入:
// 输出:
// 返回:
// 说明:
////////////////////////////////////////////////////
static void jz_audio_reset(void)
{
CLRREG32(AIC_CR, AIC_CR_ERPL | AIC_CR_EREC);
SETREG32(AIC_CR, AIC_CR_FLUSH_FIFO);
OUTREG32(AIC_SR, 0x00000000);
}
开发者ID:DanielGit,项目名称:Intrisit201202,代码行数:14,代码来源:Device.c
示例20: delayupdate
//----------------------------------------------------------------------------
static void delayupdate(unsigned int *addr)
{ int rest,t,i,flag=0,counter2 = 0;
//JZ_StopTimerEx(TCU_IDLE_TIMER_CHN);
OUTREG32(A_TCU_TMSR, TCU_INTR_FLAG(TCU_IDLE_TIMER_CHN));
OUTREG16(A_TCU_TECR, TCU_TIMER(TCU_IDLE_TIMER_CHN));
rest = INREG16(A_TCU_TCNT(TCU_IDLE_TIMER_CHN))/(OSC_CLOCK / 256000);
if(g_counter>0)
{
counter2 = g_counter-rest ;
g_counter = MIN(rest,*addr);
}
else
g_counter=*addr;
for(i=0;i<NUM;i++)
{
if(( counter[i]== 0 ) && ( flag== 1 ))
{
counter[i]=addr;
flag = 0 ;
}
else
{
t = *counter[i];
t-= counter2;
*counter[i] = MAX(0,t);
}
}
JZ_StartIdleTimer(g_counter, idle_timerhandle2);
}
开发者ID:Stadtpirat,项目名称:open-p3go,代码行数:30,代码来源:timer.c
注:本文中的OUTREG32函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论