Skip to content

Commit 634b4d9

Browse files
committed
PluggableUSB: add endpoint_stall wrapper API
1 parent 4f2b798 commit 634b4d9

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

cores/arduino/USB/PluggableUSBDevice.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ void arduino::internal::PluggableUSBModule::endpoint_abort(usb_ep_t endpoint) {
3737
PluggableUSBD().endpoint_abort(endpoint);
3838
}
3939

40+
void arduino::internal::PluggableUSBModule::endpoint_stall(usb_ep_t endpoint) {
41+
PluggableUSBD().endpoint_stall(endpoint);
42+
}
43+
4044
bool arduino::internal::PluggableUSBModule::read_start(usb_ep_t endpoint, uint8_t *buffer, uint32_t size) {
4145
return PluggableUSBD().read_start(endpoint, buffer, size);
4246
}

cores/arduino/USB/PluggableUSBDevice.h

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class PluggableUSBModule {
4040
void unlock();
4141
void assert_locked();
4242
void endpoint_abort(usb_ep_t endpoint);
43+
void endpoint_stall(usb_ep_t endpoint);
4344
bool read_start(usb_ep_t endpoint, uint8_t *buffer, uint32_t size);
4445
uint32_t read_finish(usb_ep_t endpoint);
4546
bool write_start(usb_ep_t endpoint, uint8_t *buffer, uint32_t size);
@@ -198,6 +199,7 @@ class PluggableUSBDevice: public USBDevice {
198199

199200
uint8_t lastIf;
200201
internal::PluggableUSBModule* rootNode;
202+
friend class ::arduino::internal::PluggableUSBModule;
201203
};
202204
}
203205

libraries/USBHID/PluggableUSBHID.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "USBHID_Types.h"
2626
#include "OperationList.h"
2727

28-
#include "PluggableUSBDevice.h"
28+
#include "USB/PluggableUSBDevice.h"
2929

3030

3131
/**

0 commit comments

Comments
 (0)