User Manual

UG_1x22_053 73M1822/73M1922 Control Module User Guide
Rev. 1.0 25
6.1.4 M1X22_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
tsc_1X22_ctl_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 M1X22_CNTRY_STRUCT_t structure.
#define M1X22_SET_COUNTRY_CONFIG _IOWR(0xA4, 0xF5, unsigned int)
Prototype
int ioctl (
int chan_fd,
int M1X22_SET_COUNTRY_CONFIG,
unsigned long param );
Parameters
Data Type Name Description
int
chan_fd
Channel descriptor.
int
M1X22_SET_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
Always returns 0.
Example
The following example illustrates the writing of the new country config setting for UK.
M1X22_CNTRY_STRUCT_t country_config;
country_config.cnum = M1X22_CNTRY_CODE_UK;
strcpy ((void *) &country_config.ccode, “UK”);
strcpy ((void *) &country_config.country, “United Kingdom”);
country_config.ac_impedance = 3;
country_config.dc_vi_mask = 2;
country_config.rgth_value = 1;
country_config.auto_cid_enable = FALSE;
country_config.use_seize_state = FALSE;
ioctl (fd, M1X22_SET_COUNTRY_CONFIG, (unsigned long) &country_config);