mirror of https://github.com/ARMmbed/mbed-os.git
Updated USBDevice to use Callback
Updated USBAudio and USBSerial to use Callback<void()> instead of FunctionPointer to fix compiler warnings.pull/2714/head
parent
ec37b597e4
commit
971397f900
|
@ -25,7 +25,7 @@
|
||||||
#include "USBDevice_Types.h"
|
#include "USBDevice_Types.h"
|
||||||
|
|
||||||
#include "USBDevice.h"
|
#include "USBDevice.h"
|
||||||
|
#include "Callback.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* USBAudio example
|
* USBAudio example
|
||||||
|
@ -275,7 +275,7 @@ private:
|
||||||
volatile uint8_t * buf_stream_out;
|
volatile uint8_t * buf_stream_out;
|
||||||
|
|
||||||
// callback to update volume
|
// callback to update volume
|
||||||
FunctionPointer updateVol;
|
Callback<void()> updateVol;
|
||||||
|
|
||||||
// boolean showing that the SOF handler has been called. Useful for readNB.
|
// boolean showing that the SOF handler has been called. Useful for readNB.
|
||||||
volatile bool SOF_handler;
|
volatile bool SOF_handler;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include "USBCDC.h"
|
#include "USBCDC.h"
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
#include "CircBuffer.h"
|
#include "CircBuffer.h"
|
||||||
|
#include "Callback.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* USBSerial example
|
* USBSerial example
|
||||||
|
@ -153,7 +153,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FunctionPointer rx;
|
Callback<void()> rx;
|
||||||
CircBuffer<uint8_t,128> buf;
|
CircBuffer<uint8_t,128> buf;
|
||||||
void (*settingsChangedCallback)(int baud, int bits, int parity, int stop);
|
void (*settingsChangedCallback)(int baud, int bits, int parity, int stop);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue