AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_DMACMgrSetDescList(AG903_DMACMgrHandle *handle, AG903_DMACMgrConfig *config, 2: AG903_DMACMgrDesc *desc_list, int list_num) 3: { 4: uint32_t unit = ((AG903_DMACMgrHandleStat*)handle - handle_list); 5: uint8_t enable; 6: 7: if(unit >= AG903_DMAC_UNIT_NUM || &handle_list[unit] != (AG903_DMACMgrHandleStat*)handle || 8: NULL == config || NULL == desc_list || 0 == list_num) 9: { 10: return -AG903_EINVAL; 11: } 12: 13: 14: enable = DMACMgr_CheckEnable(unit); 15: if(true == enable) { 16: return -AG903_EBUSY; 17: } 18: 19: if(false == initdesc) { 20: initdesc = true; 21: AG903_DMACPrmSetLOCAL_DESC_MEM_BASE(LOCAL_DESC_MEM_ADDR); 22: } 23: DMACPrmParamCFG cfg = { 24: .TCIntMsk = config->st.TCIntMsk, 25: .ErrIntMsk = config->st.ErrIntMsk, 26: .AbtIntMsk = config->st.AbtIntMsk, 27: .SrcRS = config->st.SrcRS, 28: .SrcHEn = config->st.SrcHEn, 29: .DstRS = config->st.DstRS, 30: .DstHEn = config->st.DstHEn, 31: .LLPCnt = config->st.LLPCnt, 32: .ChGntWin = config->st.ChGntWin, 33: .ChPri = config->st.ChPri, 34: .WOMode = config->st.WOMode, 35: .UnalignMode = config->st.UnalignMode, 36: }; 37: AG903_DMACPrmSetCFG_REG(unit, &cfg); 38: 39: return set_desc_entry((AG903_DMACMgrHandleStat*)handle, desc_list, list_num); 40: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.