AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_SSPMgrGetQueStatus(AG903_SSPMgrHandle* handle, AG903_SSPMgrQueStatus* status) 2: { 3: int32_t retval = AG903_ENONE; 4: uint32_t div; 5: uint32_t remain; 6: uint8_t ch; 7: 8: if(NULL == status) { 9: return -AG903_EINVAL; 10: } 11: retval = SSPMgr_CheckHandle(handle, &ch); 12: if(AG903_ENONE != retval) { 13: return -AG903_EINVAL; 14: } 15: 16: div = SspChStat[ch].wordlen / 8; 17: if(0 != (SspChStat[ch].wordlen%8)) { 18: div++; 19: } 20: 21: remain = SspChStat[ch].tx.size - SspChStat[ch].tx.cnt; 22: status->txremain = remain/div; 23: if(0 != (remain%div)) { 24: status->txremain ++; 25: } 26: status->received = (SspChStat[ch].rx.cnt/div); 27: SSPMgr_GetTxQueEntry(ch, &status->txquecnt); 28: SSPMgr_GetRxQueEntry(ch, &status->rxquecnt); 29: 30: return retval; 31: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.