M1966_get_country_config – Maxim Integrated 73M1866B/73M1966B Reference Driver User Manual
Page 33

UG_1x66B_015
73M1866B/73M1966B Reference Driver User Guide
Rev. 2.7
33
6.1.15 M1966_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 M1966_CNTRY_STRUCT_t structure. This structure is also used by the driver to return the
parameter.
#define M1966_GET_COUNTRY_CONFIG _IOWR(0xA4, 0xF4, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1966_GET_COUNTRY_CONFIG,
unsigned long param );
Parameters
Data Type
Name
Description
int
chan_fd
Channel descriptor.
int
M1966_GET_COUNTRY_CONFIG I/O control identifier for this operation.
unsigned long param
Pointer to structure M1966_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.
M1966_CNTRY_STRUCT_t country_config;
country_config.cnum = M1966_CNTRY_CODE_UK;
ioctl (fd, M1966_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”);