AG903ライブラリリファレンス
Body Source
AG903_DMACMgrGetIntStatus 関数
本文ソース
コピコード
1: int32_t AG903_DMACMgrGetIntStatus(
AG903_DMACMgrHandle
*handle, uint32_t *status) 2: { 3: uint32_t unit = ((
AG903_DMACMgrHandleStat
*)handle - handle_list); 4: uint32_t term, abt, wdt, error; 5: 6: 7:
if
(unit >=
AG903_DMAC_UNIT_NUM
|| &handle_list[unit] != (
AG903_DMACMgrHandleStat
*)handle || NULL == status) 8: { 9:
return
-
AG903_EINVAL
; 10: } 11: 12:
AG903_DMACPrmGetTIMECOUNT_STATUS
(&term); 13:
AG903_DMACPrmGetERR_ABORT_STATUS
(&error, &wdt, &abt); 14: term = (term >> unit) & 0x01; 15: error = (error >> unit) & 0x01; 16: wdt = (wdt >> unit) & 0x01; 17: abt = (abt >> unit) & 0x01; 18: 19: (*status) = (uint32_t)term; 20: (*status) |= (uint32_t)(abt<<1); 21: (*status) |= (uint32_t)(wdt<<2); 22: (*status) |= (uint32_t)(error<<3); 23: 24:
return
AG903_ENONE
; 25: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.
内容
|
インデックス
|
ホーム