Share via


RIL Driver

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

To enable your radio hardware to communicate with the RIL, you need to implement a hardware-specific RIL driver.

Note

This topic contains references to stream interface driver functions that are supported in Windows Embedded CE .NET. For more information about these functions and stream interface drivers, see the topic "Stream Interface Drivers" at this Microsoft Web site.

The following table shows the RIL driver entry points.

Function Description

RIL_Init

Called by system during boot to start the RIL driver. This function creates the worker threads, initializes global data structures, initialize COM ports, and so on. It also launches the thread that performs radio initialization and sets the RILDrv_Present event to notify the RIL proxy that the driver was loaded and initialized successfully. For more information, see XXX_Init.

RIL_Deinit

Called before driver is unloaded. This function performs cleanup and clears the RILDrv_Present event to inform the RIL proxy that the driver was unloaded. For more information, see XXX_Deinit.

RIL_Open

This function prepares RIL for use by a new client. For more information, see XXX_Open.

RIL_Close

This function frees any resources that were used by a previous client. For more information, see XXX_Close.

RIL_Read

Reads data from the device identified by the open context. This function should return zero (0). For more information, see XXX_Read.

RIL_Write

Writes data to the device. This function should return zero (0). For more information, see XXX_Write.

RIL_Seek

Moves the data pointer in the device. This function should return -1. For more information, see XXX_Seek.

RIL_PowerUp

Restores power to the device. This function should return a value of void. The implementation of this function is optional, For more information, see XXX_PowerUp.

RIL_PowerDown

Suspends power to the device. This function should return a value of void. The implementation of this function is optional, For more information, see XXX_PowerDown.

Most of the RIL API function calls pass through the RIL_IOControl function.

Typically this is implemented in a switch : case expression. The following code example shows how this is written.

switch (dwCode)
  {
// RIL_GetSubscriberNumbers()
 case IOCTL_RIL_GETSUBSCRIBERNUMBERS:
  result = RILDrv_GetSubscriberNumbers(...);
 break;

 // RIL_GetOperatorList()
 case IOCTL_RIL_GETOPERATORLIST:
 result = RILDrv_GetOperatorList(...);
 break;

 }

See Also

Concepts

RIL Architecture

Other Resources