M1966_set_country_config – Maxim Integrated 73M1866B/73M1966B Reference Driver User Manual
Page 34

73M1866B/73M1966B Reference Driver User Guide
UG_1x66B_015
34
Rev. 2.7
6.1.16 M1966_SET_COUNTRY_CONFIG
This IOCTL allows application program to write the current default setting for a particular country using
the country code as an input. Once written this becomes the new default setting for the country code until
the system is rebooted. For persistence change of default country parameter the
73m1966_cntry_tbl.c
must be change and rebuilt.
Description
Write to the current default setting of a given country code. The new country config parameter is passed
in via the M1966_CNTRY_STRUCT_t structure.
#define M1966_SET_COUNTRY_CONFIG _IOWR(0xA4, 0xF5, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1966_SET_COUNTRY_CONFIG,
unsigned long param );
Parameters
Data Type
Name
Description
int
chan_fd
Channel descriptor.
int
M1966_SET_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
Always returns 0.
Example
The following example illustrates the writing of the new country config setting for UK.
M1966_CNTRY_STRUCT_t country_config;
country_config.cnum = M1966_CNTRY_CODE_UK;
strcpy ((void *) &country_config.ccode, “UK”);
strcpy ((void *) &country_config.country, “United Kingdom”);
country_config.ac_impedance = 3;
country_config.ac_vi_mask = 2;
country_config.rgth_value = 1;
country_config.auto_cid_enable = FALSE;
country_config.use_seise_state = FALSE;
ioctl (fd, M1966_SET_COUNTRY_CONFIG, (unsigned long) &country_config);