AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_TIMRMgrClearStatus(AG903_TIMRMgrHandle* handle, uint32_t target) 2: { 3: int32_t retval = AG903_ENONE; 4: int32_t result; 5: uint32_t clrbit = 0; 6: uint8_t ch; 7: 8: result = TIMRMgr_CheckHandle(handle, &ch); 9: if(AG903_ENONE != result) { 10: return -AG903_EINVAL; 11: } 12: 13: if(AG903_TIMR_COMPARE_BIT & target) { 14: clrbit |= AG903_TIMR_STAT_CM_BIT; 15: } 16: if(AG903_TIMR_OVERFLOW_BIT & target) { 17: clrbit |= AG903_TIMR_STAT_OVF_BIT; 18: } 19: 20: if(0 != clrbit) { 21: AG903_TIMRPrmClearStatus(ch, clrbit); 22: } 23: 24: return retval; 25: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.