AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_TIMRMgrGetHandle(AG903_TIMRMgrHandle** handle) 2: { 3: int32_t retval = AG903_ENONE; 4: uint32_t loop; 5: 6: if(NULL == handle) { 7: return -AG903_EINVAL; 8: } 9: 10: for(loop=0; loop<AG903_TIMR_CH_NUM; loop++) { 11: if(false == TimrHandleStat[loop].lock) { 12: TimrHandleStat[loop].lock = true; 13: break; 14: } 15: } 16: if(AG903_TIMR_CH_NUM <= loop) { 17: return -AG903_EBUSY; 18: } 19: 20: (*handle) = (AG903_TIMRMgrHandle*)&TimrHandleStat[loop]; 21: 22: return retval; 23: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.