User Manual

73M1822/73M1922 Control Module User Guide UG_1x22_053
24 Rev. 1.0
6.1.3 M1X22_GET_COUNTRY_CONFIG
This IOCTL allows an application program to read the current default setting for a particular country using
the country code as an input.
Description
Reads the current default setting for a given country. The country code is passed in via the cnum field of
the M1X22_CNTRY_STRUCT_t structure. This structure is also used by the driver to return the
parameter.
#define M1X22_GET_COUNTRY_CONFIG _IOWR(0xA4, 0xF4, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1X22_GET_COUNTRY_CONFIG,
unsigned long param );
Parameters
Data Type Name Description
int
chan_fd
Channel descriptor.
int
M1X22_GET_COUNTRY_CONFIG
I/O control identifier for this operation.
unsigned long param
Pointer to structure
M1X22_CNTRY_STRUCT_t
.
Return Values
Data Type Description
int
0 – Successful.
-EFAULT Failed to get country config parameter.
Example
The following example illustrates the reading of the default setting for UK.
M1X22_CNTRY_STRUCT_t country_config;
country_config.cnum = M1X22_CNTRY_CODE_UK;
ioctl (fd, M1X22_GET_COUNTRY_CONFIG, (unsigned long) &country_config);
printf (“\nCountry Code : %s”, country_config.ccode);
printf (“\nac_impedance : %d”, country_config.ac_impedance);
printf (“\ndc_vi_mask : %d”, country_config.ac_vi_mask);
printf (“\nrgth_value : %d”, country_config.rgth_value);
printf (“\nauto_cid_enable : %d”, country_config.auto_cid_enable);
printf (“\nuse_seize_state : %d”, country_config.use_seize_state);
printf (“\n\n”);