|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
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. | |
| void(* | user_attach )(maple_device_t *dev) |
| User-specified device attached callback. | |
| void(* | user_detach )(maple_device_t *dev) |
| User-specified device detached callback. | |
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).
| maple_driver_t::LIST_ENTRY | ( | maple_driver | ) |
Driver list handle.
NOT A FUNCTION!
| 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.
| drv | This structure for the driver. |
| dev | The device that was connected. |
| 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.
| drv | This structure for the driver. |
| dev | The device that was detached. |
| uint32 maple_driver_t::functions |
One or more MAPLE_FUNCs ORed together.
| const char* maple_driver_t::name |
The driver name.
| 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.
| drv | This structure for the driver. |
| size_t maple_driver_t::status_size |
The size of the status buffer.
| void(* maple_driver_t::user_attach) (maple_device_t *dev) |
User-specified device attached callback.
This callback will be called when a new device of this driver is connected to the system. It should be set by applications using maple_attach_callback().
| dev | The device that was connected. |
| void(* maple_driver_t::user_detach) (maple_device_t *dev) |
User-specified device detached callback.
This callback will be called when a new device of this driver is connected to the system. It should be set by applications using maple_detach_callback().
| dev | The device that was connected. |