本文整理汇总了C++中sil_wrw_mem函数的典型用法代码示例。如果您正苦于以下问题:C++ sil_wrw_mem函数的具体用法?C++ sil_wrw_mem怎么用?C++ sil_wrw_mem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sil_wrw_mem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: target_timer_initialize
/*
* タイマの起動処理
*/
void
target_timer_initialize(intptr_t exinf)
{
CLOCK cyc;
uint32_t tmp;
#ifdef SYSTIC_USE_CALIBRATION
/* CALIBRATIONレジスタの値を使用 */
cyc = (sil_rew_mem((void *)SYSTIC_CALIBRATION) & SYSTIC_TENMS) / 10;
#else
cyc = TO_CLOCK(TIC_NUME, TIC_DENO) - 1;
#endif /* SYSTIC_USE_CALIBRATION */
/* 停止 */
tmp = sil_rew_mem((void *)SYSTIC_CONTROL_STATUS);
tmp &= ~SYSTIC_ENABLE;
sil_wrw_mem((void *)SYSTIC_CONTROL_STATUS, tmp);
sil_wrw_mem((void *)SYSTIC_RELOAD_VALUE, cyc);
sil_wrw_mem((void *)SYSTIC_CURRENT_VALUE, cyc);
tmp = sil_rew_mem((void *)SYSTIC_CONTROL_STATUS);
#ifdef SYSTIC_USE_STCLK
/* 外部クロックの使用 */
tmp |= SYSTIC_ENABLE;
#else
/* プロセッサクロックの使用 */
tmp |= SYSTIC_ENABLE|SYSTIC_CLKSOURCE;
#endif /* SYSTIC_USE_STCLK */
sil_wrw_mem((void *)SYSTIC_CONTROL_STATUS, tmp);
}
示例2: at91skyeye_init_uart
void
at91skyeye_init_uart(void)
{
/* 受信データの格納先アドレスの設定 */
sil_wrw_mem((void *)(USART0_RPR), (uint32_t)(&usart_rev_buf));
sil_wrw_mem((void *)(USART0_RCR), 0x0001);
}
示例3: target_initialize
/*
* ターゲット依存の初期化
*/
void
target_initialize(void)
{
uint32_t reg;
/*
* チップ依存の初期化
*/
chip_initialize();
/*
* Emulation Baseboardの割込みモードの設定
*/
sil_wrw_mem(EB_SYS_LOCK, EB_SYS_LOCK_UNLOCK); /* ロック解除 */
reg = sil_rew_mem(EB_SYS_PLD_CTRL1);
reg &= ~EB_SYS_PLD_CTRL1_INTMODE_MASK;
reg |= EB_SYS_PLD_CTRL1_INTMODE_NEW_NODCC;
sil_wrw_mem(EB_SYS_PLD_CTRL1, reg);
sil_wrw_mem(EB_SYS_LOCK, EB_SYS_LOCK_LOCK); /* ロック */
/*
* UARTを初期化
*/
#ifndef TOPPERS_OMIT_TECS
tPutLogCT11MPCore_initialize();
#endif /* TOPPERS_OMIT_TECS */
}
示例4: gicc_initialize
/*
* CPUインタフェースの初期化
*/
void
gicc_initialize(void)
{
/*
* CPUインタフェースをディスエーブル
*/
sil_wrw_mem(GICC_CTLR, GICC_CTLR_DISABLE);
/*
* 割込み優先度マスクを最低優先度に設定
*/
gicc_set_priority((GIC_PRI_LEVEL - 1) << GIC_PRI_SHIFT);
/*
* 割込み優先度の全ビット有効に
*/
sil_wrw_mem(GICC_BPR, 0U);
/*
* アクティブな割込みがあれば,EOIによりクリアする
*/
sil_wrw_mem(GICC_EOIR, sil_rew_mem(GICC_IAR));
/*
* CPUインタフェースをイネーブル
*/
#ifdef TOPPERS_SAFEG_SECURE
sil_wrw_mem(GICC_CTLR, (GICC_CTLR_FIQEN|GICC_CTLR_ENABLEGRP1
|GICC_CTLR_ENABLEGRP0));
#else /* TOPPERS_SAFEG_SECURE */
sil_wrw_mem(GICC_CTLR, GICC_CTLR_ENABLE);
#endif /* TOPPERS_SAFEG_SECURE */
}
示例5: uart_opn_por
SIOPCB *
uart_opn_por(ID siopid, VP_INT exinf){
SIOPCB *siopcb;
const SIOPINIB *siopinib;
siopcb = get_siopcb(siopid);
siopinib = siopcb->siopinib;
#ifndef USE_JTAG_UART
// sil_wrw_mem(UART_DIVISOR, UART_DIVISOR_VAL);
sil_wrw_mem((VP)UART_STATUS, 0x00);
/*
* 受信割り込み許可
*/
sil_wrw_mem((VP)UART_CONTROL, UART_STATUS_RRDY);
#else
sil_wrw_mem((VP)JTAG_UART_CONTROL,JTAG_UART_CONTROL_RIE);
#endif /* USE_JTAG_UART */
siopcb->exinf = exinf;
siopcb->getready = siopcb->putready = FALSE;
siopcb->openflag = TRUE;
return(siopcb);
}
示例6: set_port_pull
Inline void set_port_pull(uint32_t reg, uint_t p, bool_t up)
{
if (up) {
sil_wrw_mem((void*)GPIO_BSRR(reg), 0x01 << p);
} else {
sil_wrw_mem((void*)GPIO_BRR(reg), 0x01 << p);
}
}
示例7: Buzzer
void Buzzer(uint8_t buzzer)
{
if (buzzer == BUZZER_ON){
sil_wrw_mem((void *)FIO2SET0,sil_rew_mem((void *)FIO2SET0) | (0x1<<1) ); /*p2.0 high*/
}else {
sil_wrw_mem((void *)FIO2CLR0,sil_rew_mem((void *)FIO2CLR0) | (0x1<<1) ); /*p2.0 low*/
}
}
示例8: LED_Output
void LED_Output(uint8_t ledvalue)
{
sil_wrw_mem((void *)FIO3SET2,(0xf0 & (ledvalue<<4)));
sil_wrw_mem((void *)FIO3SET3,(0x0f & (ledvalue>>4)));
sil_wrw_mem((void *)FIO3CLR2,(0xf0 & ((~ledvalue)<<4)));
sil_wrw_mem((void *)FIO3CLR3,(0x0f & ((~ledvalue)>>4)));
}
示例9: at91skyeye_init_uart
void
at91skyeye_init_uart(uint_t siopid)
{
SIOPCB *p_siopcb = get_siopcb(siopid);
/* 受信データの格納先アドレスの設定 */
sil_wrw_mem((void *)(USART0_RPR), (uint32_t)(&(p_siopcb->usart_rev_buf)));
sil_wrw_mem((void *)(USART0_RCR), 0x0001);
}
示例10: RTC_Start
ERCD RTC_Start(void)
{
/*clear the interrupt bits must do this to let the alarm pin to be low*/
sil_wrw_mem((void *)RTC_ILR, 0x7);
/*enable rtc clock*/
sil_wrw_mem((void *)RTC_CCR, 0x11);
return ERCD_OK;
}
示例11: Buzzer_Init
void Buzzer_Init(void)
{
sil_wrw_mem((void *)SCS,sil_rew_mem((void *)SCS)|0x00000001); /*set GPIOx to use Fast I/O */
sil_wrw_mem((void *)PINSEL10,0); /*ETM interface is disabled. must set this*/
sil_wrw_mem((void *)PINSEL4,sil_rew_mem((void *)PINSEL4) & (~(0x3<<2)) ); /*set GPIOx to use Fast I/O */
sil_wrw_mem((void *)PINMODE4,sil_rew_mem((void *)PINMODE4) & (~(0x3<<2)) ); /*p2.0 pull up*/
sil_wrw_mem((void *)FIO2DIR0,sil_rew_mem((void *)FIO2DIR0) | (0x1<<1) ); /*p2.0 output*/
}
示例12: uart_putchar
/*
* 送信する文字の書き込み
*/
Inline void
uart_putchar(SIOPCB *siopcb, UB c)
{
#ifndef USE_JTAG_UART
sil_wrw_mem((VP)UART_TXDATA, c);
#else
sil_wrw_mem((VP)JTAG_UART_DATA,c);
#endif /* USE_JTAG_UART */
}
示例13: pl310_init
void
pl310_init(uint32_t aux_val, uint32_t aux_mask)
{
uint32_t tmp;
uint32_t aux;
uint32_t cache_id;
uint32_t prefetch;
uint32_t prefetch_val = 0;
uint32_t power;
int ways;
/* L2キャッシュがすでにオンになっているか確認する */
tmp = sil_rew_mem((void*)(RMA1_L2CACHE_BASE + PL310_CTRL));
/* L2キャッシュが無効の場合のみ初期化を実施する */
if ( !(tmp & 1) ) {
cache_id = sil_rew_mem((void*)(RMA1_L2CACHE_BASE + PL310_CACHE_ID));
aux = sil_rew_mem((void*)(RMA1_L2CACHE_BASE + PL310_AUX_CTRL));
prefetch = sil_rew_mem((void*)(RMA1_L2CACHE_BASE + PL310_PREFETCH_CTRL));
power = sil_rew_mem((void*)(RMA1_L2CACHE_BASE + PL310_POWER_CTRL));
if (aux & (1 << 16)) {
ways = 16;
}
else {
ways = 8;
}
aux_val |= 1 << 22;
aux_val |= 1 << 29;
prefetch_val |= 1 << 29;
aux_val |= 1 << 28;
prefetch_val |= 1 << 28;
if ((cache_id & 0x3f) > 0x6) {
prefetch_val |= 1 << 30;
}
pl310_way_mask = (1 << ways) - 1;
aux &= aux_mask;
aux |= aux_val;
prefetch |= prefetch_val;
sil_wrw_mem((void*)(RMA1_L2CACHE_BASE + PL310_AUX_CTRL), aux);
sil_wrw_mem((void*)(RMA1_L2CACHE_BASE + PL310_PREFETCH_CTRL), prefetch);
sil_wrw_mem((void*)(RMA1_L2CACHE_BASE + PL310_POWER_CTRL), power);
pl310_inv_all();
sil_wrw_mem((void*)(RMA1_L2CACHE_BASE + PL310_CTRL), 1);
}
}
示例14: uart_getchar
/*
* 受信した文字の取り出し
*/
Inline uint8_t
uart_getchar(SIOPCB *p_siopcb)
{
char c;
c = usart_rev_buf;
sil_wrw_mem((void *)(p_siopcb->p_siopinib->us_rpr), (uint32_t)(&usart_rev_buf));
sil_wrw_mem((void *)(p_siopcb->p_siopinib->us_rcr), 0x0001);
return(c);
}
示例15: uart_cls_por
void
uart_cls_por(SIOPCB *siopcb){
#ifndef USE_JTAG_UART
/* 割込み禁止 */
sil_wrw_mem((VP)UART_CONTROL, 0x00);
#else
sil_wrw_mem((VP)JTAG_UART_CONTROL,0x00);
#endif /* USE_JTAG_UART */
siopcb->openflag = FALSE;
siopcb->sendflag = FALSE;
}