2 * Copyright 2009, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
13 /* deprecated interface */
15 B_MIDI_GET_READ_TIMEOUT
= B_MIDI_DRIVER_BASE
,
16 B_MIDI_SET_READ_TIMEOUT
,
21 B_MIDI_GET_READ_TIMEOUT_OLD
= B_DEVICE_OP_CODES_END
+ 1,
22 B_MIDI_SET_READ_TIMEOUT_OLD
26 #define B_MIDI_DEFAULT_TIMEOUT 1000000000000000LL
35 #define B_MIDI_PARSER_MODULE_NAME "media/midiparser/v1"
37 typedef struct _midi_parser_module_info
{
39 int (*parse
)(uint32
* state
, uchar byte
, size_t maxSize
);
41 } midi_parser_module_info
;
44 #define B_MPU_401_MODULE_NAME "generic/mpu401/v1"
47 B_MPU_401_ENABLE_CARD_INT
= 1,
48 B_MPU_401_DISABLE_CARD_INT
51 typedef struct _generic_mpu401_module
{
53 status_t (*create_device
)(int port
, void** _handle
, uint32 workArounds
,
54 void (*interruptOp
)(int32 op
, void* card
), void* card
);
55 status_t (*delete_device
)(void* handle
);
56 status_t (*open_hook
)(void* storage
, uint32 flags
, void** _cookie
);
57 status_t (*close_hook
)(void* cookie
);
58 status_t (*free_hook
)(void* cookie
);
59 status_t (*control_hook
)(void* cookie
, uint32 op
, void* data
,
61 status_t (*read_hook
)(void* cookie
, off_t pos
, void* data
,
63 status_t (*write_hook
)(void* cookie
, off_t pos
, const void* data
,
65 bool (*interrupt_hook
)(void* cookie
);
67 } generic_mpu401_module
;
70 #endif /* _MIDI_DRIVER_H */