Reference Driver
73M1866B/73M1966B Reference Driver User Guide UG_1x66B_015
92 Rev. 2.7
8 Porting to a Specific H/W Platform
As stated earlier, it is anticipated that customer will be spending considerable time in this section. This
section provides guidelines for porting the device driver to the customer environment.
8.1 Driver Source and Include Files
The driver software is written exclusively in the C programming language and consists of the following:
Table 7: Driver Source Code Files
File Name Type Description
73m1966.c
Source
Main driver source code.
73m1966_cntry_tbl.c
Source
Country specific parameter table.
sys_drv_os.c
Source
OS independent wrapper functions.
73m1966_io.h
Include
Type definition for external interface.
73m1966.h
Include
Type definition for internal interface.
73m1966_regs.h
Include
1x66 Hardware Register definitions.
drv_config_user.h
Include
Define environment specific macro and type definition.
sys_drv_os.h
Include
Define OS independent wrappers.
There should not be any change required in the 73m1966.c source and the 73m1966.h include files.
The 73m1966_cntry_tbl.c contains the cross-reference table from country name to code index used
in the driver API to set the operation of the device according to the telephone system in the region. This
file is also static; parameters defined in this country code table are set according to the known operational
aspect of the system in the region. It can be changed to add more entries or update current entries.
The sys_drv_os.h and sys_drv_os.c files contain codes and macros used in the driver that must be
customized according to the target operating system. The drv_config_user.h contains the platform,
or BSP dependent macros. These are mainly the SPI and the PCM interfaces.
8.2 Compile Time Configurable Parameters
The following parameters can be changed at compile and build time to reflect the real customer
environment. These parameters are found in the header file: 73m1966.h and sys_drv_of_linux.h.
#define LINUX_DEVICE_MAJOR 221
#define M1966_MAX_DEVICES 16
#define M1966_MINOR_BASE 10
#define MIN_MINOR_NUM M1966_MINOR_BASE
#define MAX_MINOR_NUM (MIN_MINOR_NUM + M1966_MAX_DEVICES)