AG903ライブラリリファレンス
内容インデックスホーム
前へ上へ次へ
AG903_WDTPrmSetControl 関数

WDTWdCRのレジスタWrite

Syntax
C++
void AG903_WDTPrmSetControl(_Bool rst, _Bool intr, _Bool ext);
引数 
説明 
_Bool rst 
[in] system reset制御 
_Bool intr 
[in] system interrupt制御 
_Bool ext 
[in] external signal制御 

void

WDTWdCRのレジスタWrite 

rst , intr , ext は true=Enable , false=Disable です。

レジスタをリードモディファイライトします。

1: void AG903_WDTPrmSetControl(_Bool rst, _Bool intr, _Bool ext) 2: { 3: uint32_t set=0; 4: uint32_t clr=0; 5: 6: if(true == rst) { 7: set |= (1<<AG903_WDT_WdCR_WdRst_POS); 8: } 9: if(true == intr) { 10: set |= (1<<AG903_WDT_WdCR_WdIntr_POS); 11: } 12: if(true == ext) { 13: set |= (1<<AG903_WDT_WdCR_WdExt_POS); 14: } 15: clr = ~set & (AG903_WDT_WdCR_WdRst_MSK|AG903_WDT_WdCR_WdIntr_MSK|AG903_WDT_WdCR_WdExt_POS); 16: clr |= (1<<AG903_WDT_WdCR_WdClock_POS); 17: 18: AG903_WDT_CLR_REG(WdCR, clr); 19: AG903_WDT_SET_REG(WdCR, set); 20: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.