Zephyr Project API 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
usbd_midi2.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Titouan Christophe
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_USB_CLASS_USBD_MIDI_H_
8#define ZEPHYR_INCLUDE_USB_CLASS_USBD_MIDI_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
25#include <zephyr/device.h>
26#include <zephyr/audio/midi.h>
27
37 void (*rx_packet_cb)(const struct device *dev, const struct midi_ump ump);
38
44 void (*ready_cb)(const struct device *dev, const bool ready);
45};
46
55int usbd_midi_send(const struct device *dev, const struct midi_ump ump);
56
62void usbd_midi_set_ops(const struct device *dev, const struct usbd_midi_ops *ops);
63
68#ifdef __cplusplus
69}
70#endif
71
72#endif
void usbd_midi_set_ops(const struct device *dev, const struct usbd_midi_ops *ops)
Set the application event handlers on a USB MIDI device.
int usbd_midi_send(const struct device *dev, const struct midi_ump ump)
Send a Universal MIDI Packet to the host.
Runtime device structure (in ROM) per driver instance.
Definition device.h:453
Universal MIDI Packet container.
Definition midi.h:30
MIDI2 application event handlers.
Definition usbd_midi2.h:31
void(* ready_cb)(const struct device *dev, const bool ready)
Callback type for MIDI2 interface runtime status change.
Definition usbd_midi2.h:44
void(* rx_packet_cb)(const struct device *dev, const struct midi_ump ump)
Callback type for incoming Universal MIDI Packets from host.
Definition usbd_midi2.h:37