5 m1x66_getfiledrescriptor, 6 m1x66_gethwrevision, M1x66_getfiledrescriptor – Maxim Integrated 73M1866B/73M1966B FXOAPI User Manual

Page 32: M1x66_gethwrevision

Advertising
background image

73M1866B/73M1966B FXOAPI User Guide

UG_1x66B_046

32

Rev. 2.1

2.11.5 M1x66_GetFileDrescriptor

Description

To provide full flexibility to the driver access, this API can be called by an application program to obtain
the file descriptor for a given device or channel handle. With this returned file descriptor, the user has
direct access to the driver via its native IOCTL as described in the 73M1866B/73M1966B Reference
Driver User Guide
.

Caution: Accessing directly to the driver via IOCTL in mix mode with API is generally not recommended.
However, if this becomes necessary it is strongly advised that the user carefully review the API
implementation and be aware of any potential conflicts that may exist as a result of this change.

Prototype

int M1x66_GetFileDescriptor (M1x66_HANDLE pHandle);

Parameters

Data Type

Name

Description

M1x66_HANDLE

pHandle

Device or channel handle obtains from open API.


Return Values

Data Type

Description

int

Device or channel file descriptor.
A NULL value indicates invalid, or not opened file descriptor.

2.11.6 M1x66_GetHWRevision

Description

This API reads the device hardware revision number. If the reading is successful, the device revision
number will be stored in the variable pointed to by the pHWRevision parameter.

Prototype

M1x66_RET M1x66_GetHWRevision (M1x66_HANDLE chanHandle,
unsigned int *pHWRevision)

Parameters

Data Type

Name

Description

M1x66_HANDLE

chanHandle

Channel handle from FXO open channel.

unsigned int

*pHWRevision

Pointer to hardware revision number.


Return Values

Data Type

Description

M1x66_RET

M1x66_SUCCESS – Successful.
M1x66_FAILED – Failure.


Advertising