AG903ライブラリリファレンス
内容インデックスホーム
Body Source
本文ソース
1: int32_t AG903_SSPMgrInit(uint8_t ch) 2: { 3: AG903_INTMgrHdrPrm inthdr; 4: int32_t retval = AG903_ENONE; 5: int32_t hdrid; 6: 7: if(AG903_SSP_CH_NUM <= ch) { 8: return -AG903_EINVAL; 9: } 10: 11: SSPMgr_Init(ch); 12: 13: if(0 >= SspChStat[ch].hdrid) { 14: inthdr.atr = AG903_INT_HLNG; 15: inthdr.intno = AG903_IRQ12_SSP0+ch; 16: inthdr.func = (void*)SspIntHdr[ch]; 17: hdrid = AG903_INTMgrSetHandler(&inthdr); 18: if(0 >= hdrid) { 19: return -AG903_EFAULT; 20: } 21: SspChStat[ch].hdrid = hdrid; 22: } 23: 24: AG903_INTMgrEnableInt(AG903_IRQ12_SSP0+ch); 25: 26: return retval; 27: }
Copyright (c) 2017-2025 Axell Corporation. All rights reserved.