From d4d4c798a6fed3448420ffe33af262aa46172daf Mon Sep 17 00:00:00 2001 From: Graham Keeth Date: Sat, 23 May 2020 18:17:21 -0400 Subject: [PATCH] add usb audio, cdc, and midi stub files for doxy - add stub files to relevant makefiles - include in respective headers to fix compilation --- include/libopencm3/usb/audio.h | 2 ++ include/libopencm3/usb/cdc.h | 2 ++ include/libopencm3/usb/midi.h | 2 ++ lib/efm32/ezr32wg/Makefile | 1 + lib/efm32/hg/Makefile | 1 + lib/efm32/lg/Makefile | 1 + lib/efm32/wg/Makefile | 1 + lib/lm4f/Makefile | 1 + lib/stm32/f0/Makefile | 1 + lib/stm32/f1/Makefile | 1 + lib/stm32/f2/Makefile | 1 + lib/stm32/f3/Makefile | 1 + lib/stm32/f4/Makefile | 1 + lib/stm32/l0/Makefile | 1 + lib/stm32/l1/Makefile | 1 + lib/stm32/l4/Makefile | 1 + lib/usb/usb_audio.c | 20 ++++++++++++++++++++ lib/usb/usb_cdc.c | 20 ++++++++++++++++++++ lib/usb/usb_midi.c | 20 ++++++++++++++++++++ 19 files changed, 79 insertions(+) create mode 100644 lib/usb/usb_audio.c create mode 100644 lib/usb/usb_cdc.c create mode 100644 lib/usb/usb_midi.c diff --git a/include/libopencm3/usb/audio.h b/include/libopencm3/usb/audio.h index 02cdeabd..98943829 100644 --- a/include/libopencm3/usb/audio.h +++ b/include/libopencm3/usb/audio.h @@ -40,6 +40,8 @@ LGPL License Terms @ref lgpl_license #ifndef LIBOPENCM3_USB_AUDIO_H #define LIBOPENCM3_USB_AUDIO_H +#include + /* * Definitions from the USB_AUDIO_ or usb_audio_ namespace come from: * "Universal Serial Bus Class Definitions for Audio Devices, Revision 1.0" diff --git a/include/libopencm3/usb/cdc.h b/include/libopencm3/usb/cdc.h index 20b7836f..6e57a565 100644 --- a/include/libopencm3/usb/cdc.h +++ b/include/libopencm3/usb/cdc.h @@ -38,6 +38,8 @@ LGPL License Terms @ref lgpl_license #ifndef __CDC_H #define __CDC_H +#include + /* Definitions of Communications Device Class from * "Universal Serial Bus Class Definitions for Communications Devices * Revision 1.2" diff --git a/include/libopencm3/usb/midi.h b/include/libopencm3/usb/midi.h index 11101415..44278579 100644 --- a/include/libopencm3/usb/midi.h +++ b/include/libopencm3/usb/midi.h @@ -38,6 +38,8 @@ LGPL License Terms @ref lgpl_license #ifndef LIBOPENCM3_USB_MIDI_H #define LIBOPENCM3_USB_MIDI_H +#include + /* * Definitions from the USB_MIDI_ or usb_midi_ namespace come from: * "Universal Serial Bus Class Definitions for MIDI Devices, Revision 1.0" diff --git a/lib/efm32/ezr32wg/Makefile b/lib/efm32/ezr32wg/Makefile index 6e4e75f3..10f8694f 100644 --- a/lib/efm32/ezr32wg/Makefile +++ b/lib/efm32/ezr32wg/Makefile @@ -57,6 +57,7 @@ OBJS += wdog_common.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_efm32.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/efm32/hg/Makefile b/lib/efm32/hg/Makefile index ebad0170..62949335 100644 --- a/lib/efm32/hg/Makefile +++ b/lib/efm32/hg/Makefile @@ -44,6 +44,7 @@ OBJS += timer_common.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_dwc_common.o usb_efm32hg.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/efm32/lg/Makefile b/lib/efm32/lg/Makefile index 1e98e6c4..c60762fd 100644 --- a/lib/efm32/lg/Makefile +++ b/lib/efm32/lg/Makefile @@ -57,6 +57,7 @@ OBJS += wdog_common.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_efm32.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/efm32/wg/Makefile b/lib/efm32/wg/Makefile index 0f359558..3827a05b 100644 --- a/lib/efm32/wg/Makefile +++ b/lib/efm32/wg/Makefile @@ -57,6 +57,7 @@ OBJS += wdog_common.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_efm32.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/lm4f/Makefile b/lib/lm4f/Makefile index 8d2cb21e..66d1af1f 100644 --- a/lib/lm4f/Makefile +++ b/lib/lm4f/Makefile @@ -45,6 +45,7 @@ OBJS += vector.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_lm4f.o VPATH += ../usb:../cm3 diff --git a/lib/stm32/f0/Makefile b/lib/stm32/f0/Makefile index d7af8e69..d50f0232 100644 --- a/lib/stm32/f0/Makefile +++ b/lib/stm32/f0/Makefile @@ -56,6 +56,7 @@ OBJS += usart_common_all.o usart_common_v2.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += st_usbfs_core.o st_usbfs_v2.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/f1/Makefile b/lib/stm32/f1/Makefile index eefb28a7..9371f46e 100755 --- a/lib/stm32/f1/Makefile +++ b/lib/stm32/f1/Makefile @@ -57,6 +57,7 @@ OBJS += phy.o phy_ksz80x1.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_dwc_common.o usb_f107.o OBJS += st_usbfs_core.o st_usbfs_v1.o diff --git a/lib/stm32/f2/Makefile b/lib/stm32/f2/Makefile index 83ab0748..42fb2838 100644 --- a/lib/stm32/f2/Makefile +++ b/lib/stm32/f2/Makefile @@ -54,6 +54,7 @@ OBJS += usart_common_all.o usart_common_f124.o OBJS += usb.o usb_standard.o usb_control.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_dwc_common.o usb_f107.o usb_f207.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/f3/Makefile b/lib/stm32/f3/Makefile index f3aa1698..a88d277d 100644 --- a/lib/stm32/f3/Makefile +++ b/lib/stm32/f3/Makefile @@ -55,6 +55,7 @@ OBJS += usart_common_v2.o usart_common_all.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += st_usbfs_core.o st_usbfs_v1.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/f4/Makefile b/lib/stm32/f4/Makefile index c560f56b..0a30b0d1 100644 --- a/lib/stm32/f4/Makefile +++ b/lib/stm32/f4/Makefile @@ -66,6 +66,7 @@ OBJS += usart_common_all.o usart_common_f124.o OBJS += usb.o usb_standard.o usb_control.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += usb_dwc_common.o usb_f107.o usb_f207.o OBJS += mac.o phy.o mac_stm32fxx7.o phy_ksz80x1.o diff --git a/lib/stm32/l0/Makefile b/lib/stm32/l0/Makefile index 68448ac4..1322690d 100644 --- a/lib/stm32/l0/Makefile +++ b/lib/stm32/l0/Makefile @@ -55,6 +55,7 @@ OBJS += usart_common_all.o usart_common_v2.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += st_usbfs_core.o st_usbfs_v2.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/l1/Makefile b/lib/stm32/l1/Makefile index 6d616342..b2bf7381 100644 --- a/lib/stm32/l1/Makefile +++ b/lib/stm32/l1/Makefile @@ -54,6 +54,7 @@ OBJS += usart_common_all.o usart_common_f124.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += st_usbfs_core.o st_usbfs_v1.o VPATH += ../../usb:../:../../cm3:../common diff --git a/lib/stm32/l4/Makefile b/lib/stm32/l4/Makefile index 2f26dfd0..31822b75 100644 --- a/lib/stm32/l4/Makefile +++ b/lib/stm32/l4/Makefile @@ -57,6 +57,7 @@ OBJS += usart_common_all.o usart_common_v2.o OBJS += usb.o usb_control.o usb_standard.o usb_msc.o OBJS += usb_hid.o +OBJS += usb_audio.o usb_cdc.o usb_midi.o OBJS += st_usbfs_core.o st_usbfs_v2.o OBJS += usb_dwc_common.o usb_f107.o diff --git a/lib/usb/usb_audio.c b/lib/usb/usb_audio.c new file mode 100644 index 00000000..0c9425cd --- /dev/null +++ b/lib/usb/usb_audio.c @@ -0,0 +1,20 @@ +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include + +/* This stub exists just to trick doxygen. */ diff --git a/lib/usb/usb_cdc.c b/lib/usb/usb_cdc.c new file mode 100644 index 00000000..77b7f805 --- /dev/null +++ b/lib/usb/usb_cdc.c @@ -0,0 +1,20 @@ +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include + +/* This stub exists just to trick doxygen. */ diff --git a/lib/usb/usb_midi.c b/lib/usb/usb_midi.c new file mode 100644 index 00000000..045aeb80 --- /dev/null +++ b/lib/usb/usb_midi.c @@ -0,0 +1,20 @@ +/* + * This file is part of the libopencm3 project. + * + * This library is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library. If not, see . + */ + +#include + +/* This stub exists just to trick doxygen. */