KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
maple_driver_t Struct Reference

A maple device driver. More...

#include <dc/maple.h>

Public Member Functions

 LIST_ENTRY (maple_driver) drv_list
 Driver list handle.
 

Data Fields

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

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

◆ LIST_ENTRY()

maple_driver_t::LIST_ENTRY ( maple_driver )

Driver list handle.

NOT A FUNCTION!

Field Documentation

◆ attach

int(* maple_driver_t::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.

◆ detach

void(* maple_driver_t::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.

◆ functions

uint32 maple_driver_t::functions

One or more MAPLE_FUNCs ORed together.

◆ name

const char* maple_driver_t::name

The driver name.

◆ periodic

void(* maple_driver_t::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.

◆ status_size

size_t maple_driver_t::status_size

The size of the status buffer.


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