AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_DMACMgrClearInt(AG903_DMACMgrHandle *handle, uint32_t clrbit) 2: { 3: uint32_t unit = ((AG903_DMACMgrHandleStat*)handle - handle_list); 4: uint8_t term, abt, wdt, error; 5: 6: 7: if(unit >= AG903_DMAC_UNIT_NUM || &handle_list[unit] != (AG903_DMACMgrHandleStat*)handle) 8: { 9: return -AG903_EINVAL; 10: } 11: 12: term = 0; 13: abt = 0; 14: wdt = 0; 15: error = 0; 16: if(AG903_DMAC_INTSTS_TERM&clrbit) { 17: term =1; 18: } 19: if(AG903_DMAC_INTSTS_ABORT&clrbit) { 20: abt=1; 21: } 22: if(AG903_DMAC_INTSTS_WDT&clrbit) { 23: wdt=1; 24: } 25: if(AG903_DMAC_INTSTS_ERROR&clrbit) { 26: error=1; 27: } 28: AG903_DMACPrmSetTIMECOUNT_INT_CLEAR(term<<unit); 29: AG903_DMACPrmSetERR_ABORT_INT_CLEAR(error<<unit, wdt<<unit, abt<<unit); 30: 31: return AG903_ENONE; 32: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.