1: int32_t AG903_SSPMgrReleaseHandle(
AG903_SSPMgrHandle* handle)
2: {
3: int32_t retval =
AG903_ENONE;
4: _Bool idle;
5: uint8_t ch;
6:
7: retval = SSPMgr_CheckHandle(handle, &ch);
8:
if(
AG903_ENONE != retval) {
9:
return -
AG903_EINVAL;
10: }
11: idle = SSPMgr_CheckIdle(ch);
12:
if(
true != idle) {
13:
return -
AG903_EBUSY;
14: }
15:
16: SspHandleStat[ch].lock =
false;
17:
18:
return retval;
19: }