DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

client_callback(D2pccard)


client_callback -- handle event notifications from CardServices

Syntax

   void client_callback(ushort usSocket,
             ushort usEvent, ClientData_t *pclient);

Description

The client_callback( ) entry point is the callback routine for a PC Card driver.

Arguments


usSocket
Logical socket.

event_code
Event code; see PCMCIA Card Services Specification , Appendix B, pp. 165-167.

pclient
Pointer to the ClientData(D4pccard) structure that points to the data needed by the client device driver.

The arguments must match the values for the corresponding members of the ClientData(D4pccard) structure.

Return values

None

Usage

The client_callback( ) routine must be declared in the ClientHandle(D4pccard) structure and registered with the RegisterClient(D3pccard) function before it is called.

The client_callback( ) routine is typically coded as a simple switch statement that calls appropriate code for each event type. It is called for every client that has been registered and for every function that is present on the socket.

The following functionality must be coded in the driver's client_callback( ) routine:

Context and synchronization

Interrupt context. The driver may not block or access any process state information.

Version applicability

pccard: 1, 2

References

ClientData(D4pccard), ClientHandle(D4pccard), RegisterClient(D3pccard)

Examples

   client_callback(ushort usSocket, ushort usEvent, ClientData_t *pclient;)
   

switch(event) { case CARD_REMOVAL { device_remove(parameter1, parameter2); break; }

case CARD_INSERTION { device_insert(parameter1, parameter2) } break; }


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005