User guide
73M1822/73M1922 Modem API User Guide UG_1x22_055
10 Rev. 1.0
2.4 M1X22_CloseDevice
Description
This API performs the low level closing of the device handle. It should be called before exiting application
program to release all resource associated with the open device. Closing this device will automatically
force the closing of any opened channel handles.
Prototype
M1X22_RET M1X22_CloseDevice (M1X22_HANDLE devHandle);
Parameters
Data Type Name Description
M1X22_HANDLE
devHandle
Device handle obtained from open device.
Return Values
Data Type Description
M1X22_RET
M1X22_SUCCESS – Successfully close the device handle.
M1X22_FAILED – Failed to close the handle.
2.5 M1X22_OpenChannel
Description
This API performs the low level opening of the channel descriptor. By default, the channel descriptor is
known as “/dev/tsc_1x22_ctl_channelxx”, where XX varies from 1 to 16 representing channel 0 to
15 respectively. Calling to the open channel API is mandatory before any access to the channel can be
performed, and it must be called after the open device as this API requires the device handle to be
passed in as the second parameter. A successful open channel returns a non-zero channel handle that
can be used to access other channel related APIs.
Prototype
M1X22_RET M1X22_OpenChannel (
char *pChanName,
M1X22_HANDLE devHandle,
int chanNum);
Parameters
Data Type Name Description
char *
pChanName
Channel descriptor name. (Default: /dev/ter11...26).
M1X22_HANDLE
devHandle
Device handle obtained from open device.
int
chanNum
Channel number from 0 to 15.
Return Values
Data Type Description
M1X22_HANDLE
0 – Failed to open channel.
None-zero handle – Successful.