Skip to content

Commit df5baf6

Browse files
gpsimenosevedon
authored andcommitted
USB public APIs cleanup (#11034)
The contents of the usb directory were moved to appropriate locations and the usb directory removed. * Public USB headers moved under drivers/ * Internal USB headers moved under drivers/internal/ * USB Source code moved under drivers/source/usb/ * Moved usb/device/hal/ under hal/usb/ * Moved usb/device/USBPhy/ under hal/usb/ * Merged usb/device/targets/ into targets/ * Separated public and private USB API documentation under Doxygen groups drivers-public-api and drivers-internal-api.
1 parent 8013af2 commit df5baf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+214
-43
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013-2018 Arm Limited. All rights reserved.
1+
# Copyright (c) 2013-2019 Arm Limited. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -222,7 +222,7 @@ matrix:
222222
# Check that example compiles without rtos
223223
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp
224224
- |
225-
rm -r rtos usb features/cellular features/netsocket features/nanostack \
225+
rm -r rtos drivers/source/usb features/cellular features/netsocket features/nanostack \
226226
features/lwipstack features/frameworks/greentea-client \
227227
features/frameworks/utest features/frameworks/unity components BUILD
228228
- python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0

TESTS/usb_device/hid/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, ARM Limited, All Rights Reserved
2+
* Copyright (c) 2018-2019, ARM Limited, All Rights Reserved
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License"); you may

TESTS/usb_device/serial/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, ARM Limited, All Rights Reserved
2+
* Copyright (c) 2018-2019, ARM Limited, All Rights Reserved
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License"); you may

usb/device/USBAudio/USBAudio.h renamed to drivers/USBAudio.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828
#include "ByteBuffer.h"
2929
#include "rtos/EventFlags.h"
3030

31+
/** \ingroup drivers */
32+
/** \addtogroup drivers-public-api */
33+
/** @{*/
34+
/**
35+
* \defgroup drivers_USBAudio USBAudio class
36+
* @{
37+
*/
38+
39+
3140
/**
3241
* USBAudio example
3342
*
@@ -373,4 +382,7 @@ class USBAudio: protected USBDevice {
373382

374383
};
375384

385+
/** @}*/
386+
/** @}*/
387+
376388
#endif

usb/device/USBSerial/USBCDC.h renamed to drivers/USBCDC.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727

2828
class AsyncOp;
2929

30+
/** \ingroup drivers */
31+
/** \addtogroup drivers-public-api */
32+
/** @{*/
33+
/**
34+
* \defgroup drivers_USBCDC USBCDC class
35+
* @{
36+
*/
37+
3038
class USBCDC: public USBDevice {
3139
public:
3240

@@ -224,4 +232,7 @@ class USBCDC: public USBDevice {
224232
uint32_t _rx_size;
225233
};
226234

235+
/** @}*/
236+
/** @}*/
237+
227238
#endif

usb/device/USBCDC_ECM/USBCDC_ECM.h renamed to drivers/USBCDC_ECM.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, Arm Limited and affiliates.
2+
* Copyright (c) 2018-2019, Arm Limited and affiliates.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -38,6 +38,14 @@
3838
#define PACKET_TYPE_BROADCAST (1<<3)
3939
#define PACKET_TYPE_MULTICAST (1<<4)
4040

41+
/** \ingroup drivers */
42+
/** \addtogroup drivers-public-api */
43+
/** @{*/
44+
/**
45+
* \defgroup drivers_USBCDC_ECM USBCDC_ECM class
46+
* @{
47+
*/
48+
4149
class USBCDC_ECM: public USBDevice {
4250
public:
4351

@@ -267,4 +275,7 @@ class USBCDC_ECM: public USBDevice {
267275
void _notify_connect();
268276
};
269277

278+
/** @}*/
279+
/** @}*/
280+
270281
#endif

usb/device/USBHID/USBHID.h renamed to drivers/USBHID.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
#include "OperationList.h"
2727

2828

29+
/** \ingroup drivers */
30+
/** \addtogroup drivers-public-api */
31+
/** @{*/
32+
/**
33+
* \defgroup drivers_USBHID USBHID class
34+
* @{
35+
*/
2936

3037
/**
3138
* USBHID example
@@ -268,4 +275,7 @@ class USBHID: public USBDevice {
268275

269276
};
270277

278+
/** @}*/
279+
/** @}*/
280+
271281
#endif

usb/device/USBHID/USBKeyboard.h renamed to drivers/USBKeyboard.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ enum FUNCTION_KEY {
7474
UP_ARROW, /* Up arrow */
7575
};
7676

77+
/** \ingroup drivers */
78+
/** \addtogroup drivers-public-api */
79+
/** @{*/
80+
/**
81+
* \defgroup drivers_USBKeyboard USBKeyboard class
82+
* @{
83+
*/
84+
7785
/**
7886
* USBKeyboard example
7987
* @code
@@ -181,7 +189,7 @@ class USBKeyboard: public USBHID, public mbed::Stream {
181189
virtual void report_rx();
182190

183191
/**
184-
* Read status of lock keys. Useful to switch-on/off leds according to key pressed. Only the first three bits of the result is important:
192+
* Read status of lock keys. Useful to switch-on/off LEDs according to key pressed. Only the first three bits of the result is important:
185193
* - First bit: NUM_LOCK
186194
* - Second bit: CAPS_LOCK
187195
* - Third bit: SCROLL_LOCK
@@ -209,4 +217,7 @@ class USBKeyboard: public USBHID, public mbed::Stream {
209217

210218
};
211219

220+
/** @}*/
221+
/** @}*/
222+
212223
#endif

usb/device/USBMIDI/USBMIDI.h renamed to drivers/USBMIDI.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030

3131
#define DEFAULT_CONFIGURATION (1)
3232

33+
/** \ingroup drivers */
34+
/** \addtogroup drivers-public-api */
35+
/** @{*/
36+
/**
37+
* \defgroup drivers_USBMIDI USBMIDI class
38+
* @{
39+
*/
40+
3341
/**
3442
* USBMIDI example
3543
*
@@ -182,4 +190,7 @@ class USBMIDI: public USBDevice {
182190
bool _next_message();
183191
};
184192

193+
/** @}*/
194+
/** @}*/
195+
185196
#endif

usb/device/USBMSD/USBMSD.h renamed to drivers/USBMSD.h

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,27 @@
2222
#include "USBDescriptor.h"
2323
#include "USBDevice_Types.h"
2424
#include "platform/Callback.h"
25-
#include "events/PolledQueue.h"
26-
#include "events/Task.h"
25+
#include "drivers/internal/PolledQueue.h"
26+
#include "drivers/internal/Task.h"
2727
#include "BlockDevice.h"
2828
#include "Mutex.h"
2929

3030
#include "USBDevice.h"
3131

32+
/** \ingroup drivers */
33+
/** \addtogroup drivers-public-api */
34+
/** @{*/
35+
/**
36+
* \defgroup drivers_USBMSD USBMSD class
37+
* @{
38+
*/
39+
3240
/**
3341
* USBMSD class: generic class in order to use all kinds of blocks storage chip
3442
*
3543
* Introduction
3644
*
37-
* USBMSD implements the MSD protocol. It permits to access a block device (flash, sdcard,...)
45+
* USBMSD implements the MSD protocol. It permits to access a block device (flash, SD Card,...)
3846
* from a computer over USB.
3947
*
4048
* @code
@@ -304,4 +312,7 @@ class USBMSD: public USBDevice {
304312
void fail();
305313
};
306314

315+
/** @}*/
316+
/** @}*/
317+
307318
#endif

0 commit comments

Comments
 (0)