KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Data Fields
maple_driver Struct Reference

A maple device driver. More...

#include <dc/maple.h>

Public Member Functions

 LIST_ENTRY (maple_driver) drv_list
 Driver list handle. NOT A FUNCTION! More...
 

Data Fields

uint32 functions
 One or more MAPLE_FUNCs ORed together. More...
 
const char * name
 The driver name. More...
 
void(* periodic )(struct maple_driver *drv)
 Periodic polling callback. More...
 
int(* attach )(struct maple_driver *drv, maple_device_t *dev)
 Device attached callback. More...
 
void(* detach )(struct maple_driver *drv, maple_device_t *dev)
 Device detached callback. More...
 

Detailed Description

A maple device driver.

Anything which is added to this list is capable of handling one or more maple device types. When a device of the given type is connected (includes startup "connection"), the driver is invoked. This same process happens for disconnection, response receipt, and on a periodic interval (for normal updates).

Member Function Documentation

maple_driver::LIST_ENTRY ( maple_driver  )

Driver list handle. NOT A FUNCTION!

Field Documentation

int(* maple_driver::attach)(struct maple_driver *drv, maple_device_t *dev)

Device attached callback.

This callback will be called when a new device of this driver is connected to the system.

Parameters
drvThis structure for the driver.
devThe device that was connected.
Returns
0 on success, <0 on error.
void(* maple_driver::detach)(struct maple_driver *drv, maple_device_t *dev)

Device detached callback.

This callback will be called when a device of this driver is disconnected from the system.

Parameters
drvThis structure for the driver.
devThe device that was detached.
uint32 maple_driver::functions

One or more MAPLE_FUNCs ORed together.

const char* maple_driver::name

The driver name.

void(* maple_driver::periodic)(struct maple_driver *drv)

Periodic polling callback.

This callback will be called to update the status of connected devices periodically.

Parameters
drvThis structure for the driver.

The documentation for this struct was generated from the following file: