Skip to content

Commit bf36319

Browse files
authored
Merge pull request #2633 from neilt6/usbdevice-callback-patch
Updated USBDevice to use Callback
2 parents bb8ad21 + fc6cd71 commit bf36319

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/USBDevice/USBAudio/USBAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "USBDevice_Types.h"
2626

2727
#include "USBDevice.h"
28-
28+
#include "Callback.h"
2929

3030
/**
3131
* USBAudio example
@@ -275,7 +275,7 @@ class USBAudio: public USBDevice {
275275
volatile uint8_t * buf_stream_out;
276276

277277
// callback to update volume
278-
FunctionPointer updateVol;
278+
Callback<void()> updateVol;
279279

280280
// boolean showing that the SOF handler has been called. Useful for readNB.
281281
volatile bool SOF_handler;

libraries/USBDevice/USBSerial/USBSerial.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "USBCDC.h"
2323
#include "Stream.h"
2424
#include "CircBuffer.h"
25-
25+
#include "Callback.h"
2626

2727
/**
2828
* USBSerial example
@@ -153,7 +153,7 @@ class USBSerial: public USBCDC, public Stream {
153153
}
154154

155155
private:
156-
FunctionPointer rx;
156+
Callback<void()> rx;
157157
CircBuffer<uint8_t,128> buf;
158158
void (*settingsChangedCallback)(int baud, int bits, int parity, int stop);
159159
};

0 commit comments

Comments
 (0)